/* ====================================
   AIContent - 内容营销发布系统
   企业级UI设计系统 - 视觉最佳实践
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 应用侧栏宽度 — 响应式断点需加上此值 */
    --app-sidebar-width: 240px;
    --layout-stack-bp: 959px;

    /* 主色调 - 品牌色 */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;

    /* 功能色 */
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --success-hover: #059669;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --danger-color: #ef4444;
    --danger-bg: #fef2f2;
    --info-color: #3b82f6;
    --info-bg: #dbeafe;

    /* 背景色 */
    --bg-color: #f1f5f9;
    --bg-secondary: #f8fafc;
    --card-bg: #ffffff;

    /* 文字色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* 边框 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* 侧边栏 */
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #818cf8;

    /* 顶部导航 */
    --header-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --header-text: #f1f5f9;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 布局 ========== */
.app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 60px 1fr;
    min-height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.top-header {
    grid-column: 1 / -1;
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    color: var(--header-text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ========== 用户信息 ========== */
.user-info-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--header-text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-logout-btn {
    font-size: 12px !important;
    padding: 2px 8px !important;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.user-logout-btn:hover {
    opacity: 1;
}

.user-login-prompt {
    display: flex;
    align-items: center;
}

.header-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--sidebar-text);
    padding: 4px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.header-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--sidebar-text);
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: rgba(255,255,255,0.15);
    color: var(--header-text);
    border-color: rgba(255,255,255,0.25);
}

/* ========== 侧边栏 ========== */
.sidebar {
    grid-row: 2;
    grid-column: 1;
    background: var(--sidebar-bg);
    padding: var(--space-md) 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.nav-group {
    margin-bottom: var(--space-md);
}

.nav-group-title {
    padding: var(--space-sm) var(--space-lg);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.nav-list {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--sidebar-text);
    font-size: 14px;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--sidebar-active);
    border-left-color: var(--primary-color);
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-text {
    font-weight: 500;
}

/* ========== 主内容区 ========== */
.main-content {
    grid-row: 2;
    grid-column: 2;
    min-width: 0;
    padding: var(--space-lg) var(--space-xl);
    overflow-y: auto;
    overflow-x: hidden;
    max-width: none;
    width: 100%;
    background: var(--bg-color);
    container-type: inline-size;
    container-name: app-main;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ========== 页面头部 ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    gap: var(--space-md);
}

.page-header h1,
.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.page-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

/* ========== 按钮系统 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 36px;
    position: relative;
    overflow: hidden;
}

.btn:disabled, .btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled):not(.loading) {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled):not(.loading) {
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled):not(.loading) {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-success {
    background: var(--success-color);
    color: var(--text-inverse);
}

.btn-success:hover:not(:disabled):not(.loading) {
    background: var(--success-hover);
}

.btn-danger-outline {
    background: transparent;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-danger-outline:hover:not(:disabled):not(.loading) {
    background: #fef2f2;
    border-color: #dc2626;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    min-height: 28px;
    border-radius: var(--radius-sm);
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.stat-badge.primary { background: var(--primary-light); color: var(--primary-hover); }
.stat-badge.success { background: var(--success-bg); color: var(--success-hover); }
.stat-badge.warning { background: var(--warning-bg); color: #d97706; }
.stat-badge.info { background: var(--info-bg); color: var(--info-color); }

.stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.stat-trend {
    font-weight: 600;
}

.stat-trend.up { color: var(--success-color); }
.stat-trend.down { color: var(--danger-color); }

/* ========== 仪表盘网格 ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
    gap: var(--space-md);
    align-items: start;
}

/* ========== 卡片 ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ========== 快捷操作 ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
}

.quick-actions .quick-action-btn {
    min-height: 132px;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    padding: 18px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 34%),
        rgba(255,255,255,0.74);
}

.quick-actions .action-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--primary-light);
}

.quick-actions .action-text {
    font-size: 15px;
}

/* ========== 登录状态 ========== */
.login-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-status-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    gap: 12px;
}

.login-status-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.login-status-info {
    flex: 1;
}

.login-status-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.login-status-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.login-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.login-status-indicator.logged-in {
    background: var(--success-color);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.login-status-indicator.not-logged-in {
    background: var(--danger-color);
}

.login-status-indicator.checking {
    background: var(--warning-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: 20px var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.quick-action-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== 聚合工作台 ========== */
.hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: var(--space-lg);
    align-items: stretch;
    margin-bottom: var(--space-lg);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.20), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.82));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.hub-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.10);
}

.hub-hero-growth {
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238, 242, 255, 0.82));
}

.hub-hero-growth::after {
    background: rgba(79, 70, 229, 0.08);
}

.hub-hero-main {
    position: relative;
    z-index: 1;
}

.hub-kicker,
.hub-section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hub-hero-growth .hub-kicker,
.hub-hero-growth + .hub-layout .hub-section-label {
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
}

.hub-hero h2 {
    margin: 14px 0 10px;
    font-size: 30px;
    line-height: 1.2;
    color: var(--text-primary);
}

.hub-hero p {
    max-width: 680px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.hub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.hub-flow,
.hub-signal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    align-content: center;
}

.hub-flow {
    grid-template-columns: 1fr auto 1fr auto 1fr;
}

.hub-flow-step,
.hub-signal {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-sm);
}

.hub-flow-step strong,
.hub-signal strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 6px;
}

.hub-flow-step span,
.hub-signal small {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.hub-flow-arrow {
    align-self: center;
    color: var(--primary-color);
    font-weight: 800;
}

.hub-signal-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-signal span {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
    font-weight: 800;
    font-size: 12px;
}

.hub-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: var(--space-lg);
}

.hub-section {
    padding: 22px;
    border-radius: 22px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.hub-section-header {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.hub-section-header h3 {
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 18px;
}

.hub-section-meta {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.hub-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
}

.hub-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, #fff, #f8fafc);
    cursor: pointer;
    transition: all var(--transition-base);
}

.hub-card:hover,
.hub-list-item:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: var(--shadow-md);
}

.hub-card.primary {
    border-color: rgba(79, 70, 229, 0.28);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.96), #fff);
}

.hub-card.growth:hover,
.hub-card.primary.growth {
    border-color: rgba(79, 70, 229, 0.35);
}

.hub-card.primary.growth {
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.98), #fff);
}

.hub-card-icon,
.hub-list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary-light);
    font-size: 22px;
}

.hub-card-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
}

.hub-card-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    flex: 1;
}

.hub-card-cta {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
}

.hub-list {
    display: grid;
    gap: 12px;
}

.hub-list-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-base);
}

.hub-list-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.hub-list-item small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.action-icon {
    font-size: 24px;
}

.action-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== 列表 ========== */
.recent-list, .topics-list, .articles-table {
    padding: var(--space-md);
}

.recent-delivery-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.recent-delivery-item:last-child {
    border-bottom: 0;
}

.recent-delivery-item:hover strong {
    color: var(--primary-color);
}

.recent-delivery-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.recent-delivery-main strong,
.recent-delivery-main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-delivery-main strong {
    color: var(--text-primary);
    font-size: 14px;
}

.recent-delivery-main small {
    color: var(--text-secondary);
    font-size: 12px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px var(--space-md);
    text-align: center;
}

.empty-state.compact {
    padding: 24px var(--space-md);
}

.empty-state.compact .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========== 表单 ========== */
.workflow-form, .url-form {
    padding: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition-fast);
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-input:hover, .form-select:hover {
    border-color: var(--text-muted);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-sm {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* 通用 form-textarea 样式 */
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    transition: all var(--transition-fast);
    background: var(--card-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-textarea:hover {
    border-color: var(--text-muted);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.input-group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.input-group .form-input {
    flex: 1;
}

.input-group .form-select {
    width: auto;
    min-width: 140px;
}

/* ========== 进度步骤 ========== */
.progress-steps {
    padding: var(--space-lg) var(--space-xl);
    display: grid;
    grid-template-columns: repeat(10, minmax(86px, 1fr));
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    min-width: 920px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    position: relative;
    opacity: 0.6;
    transition: all var(--transition-base);
}

/* 连接线：使用 CSS 自定义属性动态计算宽度，跨越隐藏步骤 */
.progress-step::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 26px);
    width: var(--connector-width, calc(100% + 8px));
    height: 3px;
    background: var(--border-color);
    z-index: 0;
    transition: background var(--transition-base);
}

.progress-step.no-connector::after {
    display: none;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.progress-step.completed::after {
    background: var(--success-color);
}

.step-indicator {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.step-status {
    font-size: 18px;
    line-height: 1;
}

.progress-step.active .step-indicator {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    animation: activeStepPulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
}

@keyframes activeStepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
}

.progress-step.active .step-indicator .step-status {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: stepSpinner 0.8s linear infinite;
    text-indent: -9999px;
    overflow: hidden;
}

@keyframes stepSpinner {
    to { transform: rotate(360deg); }
}

.progress-step.completed .step-indicator {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-content {
    width: 100%;
    text-align: center;
}

.step-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    text-align: center;
    opacity: 1;
    white-space: nowrap;
}

.step-content p {
    opacity: 0.9;
}

.step-desc {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ========== 标题选择 ========== */
.title-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.title-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.title-item:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.title-item.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.title-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-fast);
}

.title-item.selected .title-radio {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.title-item.selected .title-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.title-content {
    flex: 1;
}

.title-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.5;
}

.title-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: var(--space-md);
}

.title-ctr {
    color: var(--primary-color);
    font-weight: 600;
}

.title-style {
    color: var(--text-secondary);
}

.card-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
}

#btn-continue-workflow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 标题选择卡片禁用 hover 位移（防止按钮"跳动"） */
#title-selection.card:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* ========== 平台标签 ========== */
.platform-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.platform-tab {
    padding: 6px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.platform-tab:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.platform-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* ========== 设置标签页 ========== */
.settings-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
}

.settings-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
    content-visibility: auto;
    contain-intrinsic-size: 600px;
    animation: fadeIn 0.2s ease;
}

.providers-list, .configs-list {
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

/* ========== Prompt卡片 ========== */
.prompts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
}

.prompt-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.prompt-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.prompt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.prompt-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.prompt-card-meta {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.prompt-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.prompt-badge.role { background: var(--primary-light); color: var(--primary-hover); }
.prompt-badge.platform { background: #f3e8ff; color: #9333ea; }
.prompt-badge.default { background: var(--success-bg); color: var(--success-hover); }

.prompt-card-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.prompt-card-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.prompt-card-actions button {
    padding: 4px 10px;
    font-size: 12px;
}

/* ========== 配置卡片 ========== */
.providers-list, .configs-list {
    padding: var(--space-md);
}

.config-card, .provider-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-sm);
    transition: box-shadow var(--transition-base);
}

.config-card:hover, .provider-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.config-card-header, .provider-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-md) var(--space-md) 0;
}

.config-card-title, .provider-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.config-card-meta, .provider-card-meta {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.config-badge, .provider-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.config-badge.provider, .provider-badge.provider { background: var(--info-bg); color: var(--info-color); }
.config-badge.model-type, .provider-badge.model-type { background: #f3e8ff; color: #9333ea; }
.config-badge.task, .provider-badge.task { background: var(--warning-bg); color: #d97706; }
.config-badge.enabled, .provider-badge.enabled { background: var(--success-bg); color: var(--success-hover); }
.config-badge.disabled, .provider-badge.disabled { background: var(--border-light); color: var(--text-muted); }
.config-badge.default, .provider-badge.default { background: var(--primary-light); color: var(--primary-hover); }

.config-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.config-card-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* 测试连接结果样式 */
.form-hint.success {
    color: #2e7d32;
}
.form-hint.error {
    color: #c62828;
}

/* ========== 对话框 ========== */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.dialog-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    animation: dialogIn 0.2s ease;
}

@keyframes dialogIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dialog-box h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.dialog-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content.modal-large {
    max-width: 950px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    background: none;
    border: none;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    top: 72px;
    right: var(--space-lg);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--card-bg);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 300px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.warning { border-left-color: var(--warning-color); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(100%); }
}

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.toast-message { font-size: 12px; color: var(--text-secondary); }

/* ========== 加载遮罩 ========== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    color: white;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--space-md);
}

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

#loading-text {
    font-size: 14px;
    font-weight: 500;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

/* ========== 热点列表 ========== */
.topics-list {
    margin-top: var(--space-md);
}

.topic-item {
    background: var(--card-bg);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.topic-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.topic-item .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.topic-item .title {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.topic-item .meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    flex-shrink: 0;
}

.source-tag {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.heat {
    color: var(--danger-color);
    font-weight: 600;
}

/* ========== 结果框 ========== */
.result-box {
    background: var(--card-bg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.7;
}

.result-box.error {
    border-color: var(--danger-color);
    background: var(--danger-bg);
    color: var(--danger-color);
}

.result-box.success {
    border-color: var(--success-color);
}

/* ========== 合规状态 ========== */
.compliance-pass {
    color: var(--success-color);
    font-weight: 600;
}

.compliance-fail {
    color: var(--danger-color);
    font-weight: 600;
}

.compliance-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    background: var(--warning-color, #f59e0b);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    position: relative;
}

.compliance-warning-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    min-width: 180px;
    max-width: 300px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    pointer-events: none;
}

.compliance-warning-icon:hover::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1f2937;
    z-index: 100;
}

/* ========== 工作流结果 ========== */
.workflow-result {
    padding: var(--space-md);
}

.result-section {
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.result-section h4 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-content {
    font-size: 13px;
    color: var(--text-secondary);
}

.title-result {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.badge.success { background: var(--success-bg); color: var(--success-hover); }
.badge.warning { background: var(--warning-bg); color: #b45309; }

.btn-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.full-content {
    max-height: 400px;
    overflow-y: auto;
}

.content-preview {
    white-space: pre-wrap;
    line-height: 1.7;
}

.summary-block {
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-sm);
}

.delivery-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
}

.delivery-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.delivery-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.delivery-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.delivery-link {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    background: var(--card-bg);
}

.delivery-link:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.delivery-muted {
    font-size: 12px;
    color: var(--text-muted);
}

.artifact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artifact-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
}

.artifact-path {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-details summary {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.delivery-preview-meta {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.delivery-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.platform-content-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: var(--card-bg);
    margin-bottom: 10px;
}

.platform-content-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.delivery-article-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.delivery-article-row:last-child { border-bottom: none; }
.delivery-article-row:hover { background: var(--bg-secondary); }
.delivery-article-info { flex: 1; min-width: 0; }
.delivery-article-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.delivery-article-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.delivery-article-platforms {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}
.delivery-platform-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.delivery-platform-badge.published {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.delivery-platform-badge.failed {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.delivery-platform-badge.scheduled {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.delivery-platform-badge.publishing {
    background: #fefce8;
    color: #a16207;
    border-color: #fef08a;
}
.delivery-article-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.delivery-article-actions .btn-sm {
    min-width: auto;
    padding: 4px 12px;
    font-size: 12px;
}

#delivery-article-list {
    overflow: hidden;
}

/* ========== 对标账号网格 ========== */
.accounts-grid, .contents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
}

/* ========== 对标账号卡片 ========== */
.account-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.account-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.account-platform {
    font-size: 12px;
    color: var(--text-muted);
}

.account-status {
    font-size: 20px;
    font-weight: bold;
}

.account-card-body {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.account-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.account-meta .meta-label {
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

.account-card-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
}

.account-card-actions .btn {
    flex: 1;
}

/* ========== 爆款内容卡片 ========== */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
    position: relative;
}

.content-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--warning-color);
    transform: translateY(-2px);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.content-info {
    flex: 1;
}

.content-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-account {
    font-size: 12px;
    color: var(--text-muted);
}

.content-viral-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.content-card-body {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.content-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.content-meta .meta-label {
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

.content-meta strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-card-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
}

.content-card-actions .btn {
    flex: 1;
}

/* ========== 内容详情 ========== */
.content-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .meta-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.meta-item span:not(.meta-label) {
    font-size: 14px;
    color: var(--text-primary);
}

.content-preview {
    white-space: pre-wrap;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

/* ========== AI拆解分析结果 ========== */
.analysis-result {
    padding: var(--space-md);
}

.analysis-result h3 {
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.analysis-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.analysis-section:last-child {
    border-bottom: none;
}

.analysis-section h4 {
    margin-bottom: var(--space-md);
    color: var(--primary-color);
    font-size: 14px;
}

.analysis-section p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.analysis-section ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.analysis-section li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

/* ========== 列表项 ========== */
.list-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-base);
}

.list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.list-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.list-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.list-item-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

/* ========== 响应式 ========== */
/* 视口断点 = 内容区断点 + 侧栏宽度，避免侧栏占宽后过早折行 */
@media (max-width: calc(var(--layout-stack-bp) + var(--app-sidebar-width))) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hub-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 按主内容区实际宽度折行（适配 SSO 内嵌窄容器） */
@container app-main (max-width: 719px) {
    .dashboard-grid,
    .hub-hero,
    .hub-layout,
    .profile-editor-container,
    .analytics-charts,
    .form-row {
        grid-template-columns: 1fr !important;
    }
    .profile-info-card {
        position: static;
    }
    .hub-flow,
    .hub-signal-panel,
    .hub-card-grid {
        grid-template-columns: 1fr;
    }
    .hub-flow-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .main-content {
        grid-column: 1;
        padding: var(--space-md);
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        gap: var(--space-md);
    }
    .page-actions {
        width: 100%;
    }
    .hub-hero {
        padding: 20px;
        border-radius: 18px;
    }
    .hub-hero h2 {
        font-size: 24px;
    }
    .hub-flow,
    .hub-signal-panel,
    .hub-card-grid {
        grid-template-columns: 1fr;
    }
    .hub-flow-arrow {
        display: none;
    }
    .hub-section {
        padding: 18px;
    }
    .hub-section-header {
        flex-direction: column;
        gap: var(--space-sm);
    }
    .hub-card {
        min-height: auto;
    }
    .progress-steps {
        flex-wrap: wrap;
    }
}

/* ========== 关键词搜索结果增强 ========== */
.search-summary {
    padding: var(--space-md);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.summary-stats {
    display: flex;
    gap: var(--space-lg);
}

.summary-stats .stat-item {
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-stats .stat-item strong {
    color: var(--text-primary);
}

.viral-count {
    color: #ff6b6b;
    font-size: 12px;
    font-weight: normal;
}

.viral-result {
    border-left: 3px solid #ff6b6b;
    background: #fff5f5;
}

.viral-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-left: var(--space-sm);
}

.result-anomaly {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 12px;
}

/* ========== Cookie管理 ========== */
.cookies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
}

.cookie-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.cookie-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.cookie-card.expired {
    opacity: 0.6;
    border-color: #ff4d4f;
}

.cookie-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.cookie-info {
    flex: 1;
}

.cookie-platform {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.cookie-account {
    font-size: 12px;
    color: var(--text-muted);
}

.cookie-status {
    font-size: 20px;
    font-weight: bold;
}

.cookie-status.active {
    color: #52c41a;
}

.cookie-status.inactive {
    color: #999;
}

.cookie-card-body {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.cookie-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.cookie-meta .meta-label {
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

.cookie-card-actions {
    display: flex;
    gap: var(--space-sm);
}

.cookie-card-actions .btn {
    flex: 1;
}

/* ========== 定时发布任务列表 ========== */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.task-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.task-item:hover {
    box-shadow: var(--shadow-sm);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.task-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.task-status {
    font-size: 13px;
    font-weight: 600;
}

.task-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.task-meta .meta-label {
    color: var(--text-muted);
}

.task-error {
    font-size: 12px;
    color: #ff4d4f;
    background: #fff1f0;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.task-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.task-actions .btn {
    flex: 1;
}

.task-detail {
    line-height: 1.8;
}

.task-detail p {
    margin: var(--space-sm) 0;
}

/* ========== 表单提示 ========== */
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    line-height: 1.5;
}

/* ========== 平台多选框 ========== */
.platform-checkboxes {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

/* ========== 排期日历 ========== */
.stats-bar {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-scheduled .stat-value { color: var(--info-color); }
.stat-published .stat-value { color: var(--success-color); }
.stat-failed .stat-value { color: var(--danger-color); }
.stat-cancelled .stat-value { color: var(--text-muted); }

.schedule-calendar {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.calendar-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.calendar-view-switcher {
    display: flex;
    gap: 2px;
}

.calendar-view-switcher .btn {
    border-radius: 0;
}
.calendar-view-switcher .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.calendar-view-switcher .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.calendar-weekday {
    background: var(--bg-secondary);
    padding: var(--space-sm);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-day {
    background: var(--card-bg);
    min-height: 100px;
    padding: var(--space-xs);
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background: var(--bg-hover, #f1f5f9);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.today {
    background: var(--primary-light);
}

.calendar-day.drag-over {
    background: #dbeafe;
    border: 2px dashed var(--primary-color);
}

.calendar-event {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.calendar-event:active {
    cursor: grabbing;
}

.calendar-event.dragging {
    cursor: grabbing;
    opacity: 0.5;
}

.calendar-day-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
    color: var(--primary-color);
    font-weight: 700;
}

.calendar-event {
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event.status-scheduled {
    background: var(--info-bg);
    color: var(--info-color);
    border-left: 2px solid var(--info-color);
}

.calendar-event.status-published {
    background: var(--success-bg);
    color: var(--success-color);
    border-left: 2px solid var(--success-color);
}

.calendar-event.status-failed {
    background: var(--danger-bg);
    color: var(--danger-color);
    border-left: 2px solid var(--danger-color);
}

.calendar-event.status-cancelled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-left: 2px solid var(--text-muted);
    text-decoration: line-through;
}

.calendar-event.status-waiting_for_browser {
    background: #fff7e6;
    color: #d48806;
    border-left: 2px solid #d48806;
    animation: pulse-waiting 2s ease-in-out infinite;
}

@keyframes pulse-waiting {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.schedule-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.schedule-list h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item:hover {
    background: var(--bg-hover, #f1f5f9);
}

.schedule-platform-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.schedule-platform-icon.wechat { background: #07c160; }
.schedule-platform-icon.xiaohongshu { background: #fe2c55; }
.schedule-platform-icon.zhihu { background: #0066ff; }
.schedule-platform-icon.weibo { background: #e6162d; }
.schedule-platform-icon.douyin { background: #000000; }

.schedule-item-info {
    flex: 1;
    min-width: 0;
}

.schedule-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.schedule-item-actions {
    display: flex;
    gap: var(--space-xs);
}

.modal-large {
    max-width: 600px;
}

/* ========== 数据分析 ========== */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.summary-label {
    font-size: 13px;
    color: var(--text-muted);
}

.analytics-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.chart-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.chart-container {
    min-height: 200px;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .analytics-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .analytics-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .stats-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-sm);
    }

    .calendar-header {
        flex-wrap: wrap;
    }

    .calendar-header h3 {
        order: -1;
        flex-basis: 100%;
    }

    .delivery-article-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .delivery-article-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .delivery-article-actions .btn-sm {
        flex: 1 1 140px;
    }
}

@media (max-width: 640px) {
    .stats-bar,
    .analytics-summary {
        grid-template-columns: 1fr;
    }

    .schedule-calendar,
    .schedule-list,
    .summary-card,
    .chart-card {
        padding: var(--space-md);
    }

    .calendar-day {
        min-height: 84px;
    }

    .delivery-article-row {
        padding: 14px 16px;
    }

    .delivery-article-title {
        white-space: normal;
    }
}

/* 简易柱状图 */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    padding: 10px 0;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bar-fill {
    width: 100%;
    max-width: 40px;
    background: var(--primary-color);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.3s;
}

.bar-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-value {
    font-size: 10px;
    color: var(--text-secondary);
}

/* 平台对比 */
.platform-compare {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.platform-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.platform-name {
    width: 80px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
}

.platform-bar-bg {
    flex: 1;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.platform-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    color: white;
    font-weight: 600;
    transition: width 0.3s;
}

/* 排行列表 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.ranking-item:last-child { border-bottom: none; }

.ranking-position {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.ranking-position.top1 { background: #f59e0b; }
.ranking-position.top2 { background: #6b7280; }
.ranking-position.top3 { background: #b45309; }
.ranking-position.normal { background: var(--text-muted); }

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

.ranking-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ranking-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 13px;
    flex-shrink: 0;
}

.ranking-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* 日历拖放区域 */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    margin-top: var(--space-md);
    background: var(--bg-secondary);
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.schedule-list .remove-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-danger);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.schedule-list .remove-btn:hover {
    background: var(--bg-hover);
}


/* ====== 手机预览样式 ====== */
.workflow-result-v2 { max-width: 100%; }

.result-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    margin-bottom: 24px;
}
.result-summary-bar .summary-item {
    display: flex;
    flex-direction: column;
    min-width: 120px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.result-summary-bar .summary-label { 
    font-size: 11px; 
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.result-summary-bar .summary-value { 
    font-size: 14px; 
    font-weight: 600; 
    color: #1e293b;
}
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }

.viral-blueprint-card {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.88));
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.viral-blueprint-main {
    margin-bottom: 16px;
}

.viral-blueprint-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.viral-blueprint-main h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.viral-blueprint-main p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.viral-blueprint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.viral-blueprint-grid div {
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 16px;
    background: rgba(255,255,255,0.82);
}

.viral-blueprint-grid span {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.viral-blueprint-grid strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.55;
}

.viral-blueprint-chain {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.viral-blueprint-chain span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}


.phone-preview-section { margin-bottom: 24px; }
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.preview-header h3 { margin: 0; }
.preview-platform-tabs { display: flex; gap: 8px; }
.preview-tab {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f8f8f8;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}
.preview-tab.active {
    background: #07c160;
    color: #fff;
    border-color: #07c160;
}
.preview-tab:hover { border-color: #07c160; }

.phone-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}
.phone-frame {
    width: 375px;
    height: 667px;
    border: 8px solid #1a1a1a;
    border-radius: 40px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}
.phone-notch {
    width: 150px;
    height: 25px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}
.phone-screen {
    height: calc(100% - 25px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 650;
    color: #333;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex: 0 0 auto;
}
.phone-content { padding: 0; }

/* 微信公众号预览 */
.wechat-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.wechat-app-nav {
    height: 48px;
    padding: 0 13px;
    border-bottom: 1px solid rgba(237,237,237,.92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    flex: 0 0 auto;
}
.wechat-nav-title {
    font-size: 16px;
    font-weight: 650;
    color: #111;
}
.wechat-nav-icon {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 25px;
    line-height: 1;
    cursor: default;
}
.wechat-back::before {
    content: "";
    display: block;
    width: 11px;
    height: 11px;
    border-left: 2px solid #111;
    border-bottom: 2px solid #111;
    transform: rotate(45deg);
    margin-left: 10px;
}
.wechat-nav-more {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 20px;
    line-height: 1;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wechat-read-progress {
    height: 2px;
    width: 38%;
    background: #07c160;
    flex: 0 0 auto;
}
.wechat-article {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 22px;
    -webkit-overflow-scrolling: touch;
}
.wechat-cover {
    width: calc(100% - 36px);
    margin: 14px 18px 4px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #f4f4f4;
}
.wechat-cover img { width: 100%; height: 100%; object-fit: cover; }
.wechat-header { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.wechat-author { display: flex; align-items: center; gap: 10px; }
.wechat-avatar {
    width: 36px; height: 36px; border-radius: 4px;
    background: #07c160; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: bold;
}
.wechat-author-info { display: flex; flex-direction: column; }
.wechat-author-name { font-size: 14px; color: #333; font-weight: 500; }
.wechat-publish-time { font-size: 11px; color: #999; }
.wechat-title {
    padding: 24px 20px 8px;
    font-size: 22px;
    font-weight: 760;
    color: #111;
    line-height: 1.38;
    margin: 0;
}
.wechat-meta-line {
    padding: 0 20px 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    line-height: 1.5;
    color: #8a8a8a;
}
.wechat-author-link { color: #576b95; font-weight: 500; }
.wechat-account-card {
    margin: 4px 20px 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    background: #f7f8fa;
}
.wechat-account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: #07c160;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.wechat-account-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wechat-account-main strong {
    font-size: 13px;
    color: #1f2937;
}
.wechat-account-main span {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wechat-account-card button {
    border: 0;
    background: #07c160;
    color: #fff;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
}
.wechat-summary {
    margin: 12px 20px 6px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    background: #f7f7f7;
    border-radius: 4px;
}
.wechat-body { padding: 10px 20px 18px; font-size: 16px; line-height: 1.88; color: #202124; }
.wechat-body p { margin: 0 0 15px; }
.wechat-body h2 { font-size: 18px; margin: 24px 0 10px; color: #111; line-height: 1.45; }
.wechat-body h3 { font-size: 17px; margin: 18px 0 8px; color: #111; line-height: 1.45; }
.wechat-body li { margin-left: 18px; margin-bottom: 6px; }
.wechat-read-original {
    margin: 0 20px 18px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f8fa;
    border-radius: 8px;
    color: #576b95;
    font-size: 15px;
    cursor: default;
}
.wechat-read-original-arrow {
    font-size: 20px;
    line-height: 1;
    color: #b0b0b0;
}
.wechat-like-panel {
    margin: 0 20px 18px;
    padding: 14px 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
}
.wechat-like-panel button {
    min-width: 86px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #576b95;
    background: #fff;
    font-size: 13px;
}
.wechat-like-panel span {
    margin-right: 3px;
}
.wechat-article-actions {
    margin: 10px 20px 18px;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}
.wechat-article-actions button {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #576b95;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
}
.wechat-comment-preview {
    margin: 0 20px 10px;
    padding-top: 16px;
    border-top: 8px solid #f5f5f5;
}
.wechat-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.wechat-comment-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}
.wechat-comment-head button {
    border: 0;
    background: transparent;
    color: #576b95;
    font-size: 13px;
}
.wechat-comment-row {
    display: flex;
    gap: 9px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.wechat-comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}
.wechat-comment-main {
    min-width: 0;
    flex: 1;
}
.wechat-comment-name {
    font-size: 12px;
    color: #576b95;
    margin-bottom: 4px;
}
.wechat-comment-text {
    font-size: 14px;
    line-height: 1.55;
    color: #1f2937;
}
.wechat-comment-meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    color: #9ca3af;
    font-size: 12px;
}
.wechat-comment-more {
    padding: 12px 0 6px;
    color: #9ca3af;
    text-align: center;
    font-size: 12px;
}
.wechat-bottom-bar {
    flex: 0 0 auto;
    z-index: 5;
    padding: 9px 12px 18px;
    background: rgba(255,255,255,.96);
    border-top: 1px solid #ededed;
    display: flex;
    align-items: center;
    gap: 10px;
}
.wechat-comment-input {
    flex: 1;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: #9ca3af;
    font-size: 13px;
    border-radius: 999px;
    background: #f5f5f5;
}
.wechat-bottom-icon {
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 19px;
    width: 28px;
}

/* 小红书预览 */
.xhs-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    color: #1f1f1f;
    overflow: hidden;
}
.xhs-top-nav {
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #f1f1f1;
    flex: 0 0 auto;
}
.xhs-nav-icon {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #111;
    width: 32px;
    cursor: default;
}
.xhs-follow-btn {
    border: 0;
    background: #ff2442;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}
.xhs-top-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.xhs-more-btn {
    width: 32px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 16px;
    letter-spacing: 1px;
}
.xhs-note-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 18px;
    -webkit-overflow-scrolling: touch;
}
.xhs-cover-wrap { position: relative; background: #f5f5f5; }
.xhs-carousel { width: 100%; aspect-ratio: 3/4; overflow: hidden; position: relative; }
.xhs-carousel-item { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}
.xhs-carousel-item.active { opacity: 1; }
.xhs-carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.xhs-cover { width: 100%; aspect-ratio: 3/4; overflow: hidden; background: #f5f5f5; }
.xhs-cover img { width: 100%; height: 100%; object-fit: cover; }
.xhs-image-count {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.44);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}
.xhs-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.xhs-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: all 0.3s ease;
}
.xhs-dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}
.xhs-cover-placeholder {
    background:
        radial-gradient(circle at 28% 18%, rgba(255,255,255,.46), transparent 28%),
        linear-gradient(135deg, #f43f5e, #fb7185 42%, #f59e0b);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 800;
    aspect-ratio: 3/4;
}
.xhs-content { padding: 14px 16px 18px; }
.xhs-title { font-size: 17px; font-weight: 800; line-height: 1.45; margin: 0 0 10px; color: #1f1f1f; }
.xhs-body { font-size: 14px; line-height: 1.72; color: #333; }
.xhs-body p { margin: 0 0 9px; }
.xhs-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: #3150a2; }
.xhs-note-meta { margin-top: 14px; font-size: 12px; color: #999; }
.xhs-comments-preview {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f1f1;
}
.xhs-comments-title {
    font-size: 13px;
    font-weight: 700;
    color: #777;
    margin-bottom: 10px;
}
.xhs-comment-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f6f6f6;
}
.xhs-comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fda4af, #f43f5e);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.xhs-comment-main {
    flex: 1;
    min-width: 0;
}
.xhs-comment-row strong {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}
.xhs-comment-row span {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.45;
}
.xhs-comment-meta {
    margin-top: 5px;
    color: #aaa;
    font-size: 11px;
}
.xhs-author { display: flex; align-items: center; gap: 8px; }
.xhs-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #ff2442; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
}
.xhs-author-name { font-size: 14px; color: #222; font-weight: 650; }
.xhs-bottom-bar {
    flex: 0 0 auto;
    z-index: 5;
    min-height: 58px;
    padding: 9px 12px 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255,255,255,.97);
    border-top: 1px solid #f1f1f1;
}
.xhs-comment-pill {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    color: #999;
    font-size: 13px;
    background: #f5f5f5;
}
.xhs-actions { display: flex; gap: 11px; font-size: 13px; color: #222; white-space: nowrap; }
.xhs-action {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 18px;
}
.xhs-action b {
    font-size: 12px;
    font-weight: 700;
}

/* 知乎预览 */
.zhihu-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.zhihu-header {
    padding: 12px 16px; border-bottom: 1px solid #f0f0f0;
    flex: 0 0 auto;
}
.zhihu-author { display: flex; align-items: center; gap: 8px; }
.zhihu-avatar {
    width: 32px; height: 32px; border-radius: 4px;
    background: #0066ff; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.zhihu-author-name { font-size: 14px; color: #333; }
.zhihu-title { padding: 16px; font-size: 18px; font-weight: bold; margin: 0; flex: 0 0 auto; }
.zhihu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px;
}
.zhihu-body { font-size: 15px; line-height: 1.8; }
.zhihu-body p { margin: 0 0 12px; }
.zhihu-footer {
    padding: 12px 16px; border-top: 1px solid #f0f0f0;
    display: flex; gap: 24px; font-size: 13px; color: #666;
    flex: 0 0 auto;
}

/* 微博预览 */
.weibo-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.weibo-header {
    padding: 12px 16px;
    flex: 0 0 auto;
}
.weibo-author { display: flex; align-items: center; gap: 8px; }
.weibo-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #ff8200; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.weibo-author-name { font-size: 14px; color: #333; }
.weibo-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px;
}
.weibo-body { font-size: 15px; line-height: 1.8; }
.weibo-body p { margin: 0 0 8px; }
.weibo-footer {
    padding: 12px 16px; border-top: 1px solid #f0f0f0;
    display: flex; gap: 24px; font-size: 13px; color: #666;
    flex: 0 0 auto;
}

/* B站预览 */
.bilibili-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bilibili-header {
    padding: 10px 12px; border-bottom: 1px solid #e3e5e7;
    display: flex; align-items: center; gap: 8px;
    flex: 0 0 auto;
}
.bilibili-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #00a1d6; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.bilibili-author-name { font-size: 14px; color: #333; }
.bilibili-follow-btn {
    margin-left: auto;
    padding: 4px 12px; border-radius: 4px; border: 1px solid #00a1d6;
    background: #00a1d6; color: #fff; font-size: 12px; cursor: default;
}
.bilibili-title {
    padding: 12px 12px 8px; font-size: 16px; font-weight: 600;
    color: #18191c; margin: 0; flex: 0 0 auto;
}
.bilibili-stats {
    padding: 0 12px 8px; font-size: 12px; color: #9499a0;
    display: flex; gap: 12px; flex: 0 0 auto;
}
.bilibili-scroll {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 12px;
}
.bilibili-body { font-size: 14px; line-height: 1.75; color: #18191c; }
.bilibili-body p { margin: 0 0 10px; }
.bilibili-body h2 { font-size: 15px; margin: 16px 0 8px; color: #18191c; }
.bilibili-footer {
    padding: 10px 12px; border-top: 1px solid #e3e5e7;
    display: flex; gap: 20px; font-size: 13px; color: #9499a0;
    flex: 0 0 auto;
}
.bilibili-footer span { display: flex; align-items: center; gap: 3px; }

/* 掘金预览 */
.juejin-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.juejin-header {
    padding: 10px 16px; border-bottom: 1px solid #e5e6eb;
    display: flex; align-items: center; gap: 8px;
    flex: 0 0 auto;
}
.juejin-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #1e80ff; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.juejin-author-name { font-size: 14px; color: #252933; }
.juejin-tag {
    margin-left: auto;
    padding: 2px 8px; border-radius: 2px;
    background: #eaf2ff; color: #1e80ff; font-size: 11px;
}
.juejin-title {
    padding: 16px; font-size: 20px; font-weight: 600;
    color: #252933; margin: 0; flex: 0 0 auto;
}
.juejin-scroll {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 16px;
}
.juejin-body { font-size: 15px; line-height: 1.8; color: #252933; }
.juejin-body p { margin: 0 0 12px; }
.juejin-body h2 { font-size: 17px; margin: 20px 0 8px; color: #252933; border-left: 3px solid #1e80ff; padding-left: 10px; }
.juejin-body h3 { font-size: 15px; margin: 14px 0 6px; color: #252933; }
.juejin-body code { background: #f6f8fa; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.juejin-footer {
    padding: 12px 16px; border-top: 1px solid #e5e6eb;
    display: flex; gap: 20px; font-size: 13px; color: #8a919f;
    flex: 0 0 auto;
}
.juejin-footer span { display: flex; align-items: center; gap: 3px; }

/* 快手预览 */
.kuaishou-preview {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kuaishou-header {
    padding: 12px 16px;
    flex: 0 0 auto;
}
.kuaishou-author { display: flex; align-items: center; gap: 8px; }
.kuaishou-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: #ff4906; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
}
.kuaishou-author-name { font-size: 14px; color: #333; font-weight: 500; }
.kuaishou-follow-btn {
    margin-left: auto;
    padding: 4px 14px; border-radius: 16px;
    border: 1px solid #ff4906; background: transparent;
    color: #ff4906; font-size: 12px; cursor: default;
}
.kuaishou-title {
    padding: 8px 16px 4px; font-size: 16px; font-weight: 600;
    color: #222; margin: 0; flex: 0 0 auto;
}
.kuaishou-scroll {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 16px;
}
.kuaishou-body { font-size: 15px; line-height: 1.75; color: #333; }
.kuaishou-body p { margin: 0 0 10px; }
.kuaishou-tags {
    padding: 8px 0; font-size: 13px; color: #2ca6f5;
    display: flex; flex-wrap: wrap; gap: 6px;
}
.kuaishou-tags span { background: #f0f8ff; padding: 2px 8px; border-radius: 4px; }
.kuaishou-footer {
    padding: 12px 16px; border-top: 1px solid #f0f0f0;
    display: flex; gap: 24px; font-size: 13px; color: #999;
    flex: 0 0 auto;
}
.kuaishou-footer span { display: flex; align-items: center; gap: 3px; }

/* === 抖音视频预览 === */
.douyin-preview {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.douyin-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    overflow: hidden;
}
.douyin-video-play {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.douyin-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}
.douyin-play-icon, .channels-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
}
.douyin-no-video-icon {
    font-size: 48px;
    opacity: 0.4;
    margin-bottom: 4px;
}
.douyin-no-video-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
}
.douyin-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}
.douyin-top-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 16px 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}
.douyin-tab {
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    font-weight: 500;
}
.douyin-tab.active {
    color: #fff;
    font-weight: 700;
    position: relative;
}
.douyin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}
.douyin-right-actions {
    position: absolute;
    right: 10px;
    bottom: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.douyin-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #fff;
    font-size: 11px;
}
.douyin-action-icon {
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.douyin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55, #25f4ee);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #fff;
}
.douyin-follow-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fe2c55;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: -10px;
}
.douyin-bottom-info {
    padding: 0 12px 16px;
    padding-right: 60px;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}
.douyin-username {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.douyin-desc-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.douyin-desc-text {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.douyin-topics {
    color: #25f4ee;
    font-size: 12px;
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.douyin-music {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}
.douyin-music-icon {
    font-size: 14px;
}

/* === 视频号预览 === */
.wechat-channels-preview {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
}
.channels-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    overflow: hidden;
}
.channels-video-play {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.channels-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}
.channels-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}
.channels-top-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 16px 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}
.channels-tab {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}
.channels-tab.active {
    color: #fff;
    font-weight: 700;
}
.channels-bottom-info {
    padding: 0 12px 16px;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}
.channels-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.channels-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07c160, #06ad56);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.channels-author-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.channels-follow-btn {
    background: #fa6400;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 12px;
    margin-left: auto;
}
.channels-desc-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.channels-desc-text {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}
.channels-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.channels-action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}
.channels-action-icon {
    font-size: 16px;
}

/* 发布操作按钮 */
.video-preview-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.video-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.video-preview-header h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.video-meta {
    display: flex;
    gap: 12px;
}

.video-meta-item {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.video-player-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    max-height: 500px;
    display: flex;
    justify-content: center;
}

.video-player-wrapper video {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.video-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.publish-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}
.publish-actions .btn { 
    min-width: 140px; 
    pointer-events: auto;
    cursor: pointer;
}
.btn-success { background: #07c160; color: #fff; border-color: #07c160; }
.btn-success:hover { background: #06ad56; }


/* ====== 发布结果弹窗 ====== */
.publish-result-dialog { padding: 8px 0; }
.publish-result-item {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid;
}
.publish-result-item.success {
    background: #f0fff4;
    border-color: #07c160;
}
.publish-result-item.error {
    background: #fff2f0;
    border-color: #ff4d4f;
}
.result-platform {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.result-message {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}
.result-link {
    display: inline-block;
    padding: 4px 12px;
    background: #1890ff;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}
.result-link:hover { background: #40a9ff; }

/* ====== Apple-like Theme Overrides ====== */
:root {
    --primary-color: #0a84ff;
    --primary-hover: #0077ed;
    --primary-light: #eaf4ff;
    --primary-dark: #0066cc;
    --success-color: #30d158;
    --success-bg: #ebfaef;
    --warning-color: #ff9f0a;
    --warning-bg: #fff6e9;
    --danger-color: #ff453a;
    --danger-bg: #fff0ef;
    --info-color: #64d2ff;
    --info-bg: #ebfbff;
    --bg-color: #f3f5f8;
    --bg-secondary: #f7f9fc;
    --card-bg: rgba(255, 255, 255, 0.86);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #8b95a7;
    --border-color: rgba(17, 24, 39, 0.08);
    --border-light: rgba(17, 24, 39, 0.05);
    --sidebar-bg: rgba(255, 255, 255, 0.68);
    --sidebar-text: #4b5563;
    --sidebar-active: #0a84ff;
    --header-bg: rgba(255, 255, 255, 0.72);
    --header-text: #111827;
    --shadow-sm: 0 2px 10px rgba(10, 15, 30, 0.06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.1);
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

body {
    font-family: "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
    background: radial-gradient(1200px 500px at -10% -10%, #ffffff 0%, transparent 60%),
                radial-gradient(1200px 500px at 110% -20%, #eef5ff 0%, transparent 60%),
                var(--bg-color);
}

.top-header {
    background: var(--header-bg);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0 0 18px 18px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-sm);
}

.logo span, .header-status, .header-btn {
    color: var(--header-text);
}

.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
}

.nav-group-title {
    color: #9aa3b2;
}

.nav-item {
    color: var(--sidebar-text);
    border-radius: 12px;
    margin: 4px 10px;
    border-left: none;
}

.nav-item:hover {
    background: rgba(10, 132, 255, 0.08);
    color: #1f2937;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.14), rgba(10, 132, 255, 0.08));
    color: var(--sidebar-active);
    border-left-color: transparent;
}

.main-content {
    max-width: 1520px;
}

.card,
.stats-bar,
.summary-card,
.chart-card,
.config-card,
.prompt-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn {
    border-radius: 999px;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0a84ff, #2f9bff);
}

.btn-primary:hover:not(:disabled):not(.loading) {
    background: linear-gradient(135deg, #0077ed, #1d8fff);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-input-sm {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

.form-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 12px;
}

.checkbox-group .checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
}

.checkbox-group .checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.hot-source-settings-group {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.hot-source-settings-group .checkbox-item {
    align-items: flex-start;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .top-header {
        border-radius: 0;
    }
    .sidebar {
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* ============ 创作者画像 ============ */
.profile-editor-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.profile-info-card h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.profile-info-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.profile-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.profile-info-card ul li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 4px 0;
    line-height: 1.5;
}

.profile-editor-main {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.profile-editor-main .form-group {
    margin-bottom: 20px;
}

.profile-editor-main .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-editor-main .form-group label .hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.profile-editor-main .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--input-bg);
    color: var(--text-primary);
    box-sizing: border-box;
}

.profile-editor-main .form-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.7;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 400px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
}

.profile-editor-main .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* profile-editor 折行由 @container app-main 统一处理 */

/* ====================================
   视觉升级层：统一非聚合页面的产品质感
   ==================================== */
:root {
    --surface-glass: rgba(255, 255, 255, 0.82);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --border-soft: rgba(148, 163, 184, 0.22);
    --brand-gradient: linear-gradient(135deg, #4f46e5, #0ea5e9);
    --warm-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
}

body {
    background:
        radial-gradient(circle at 12% -10%, rgba(79, 70, 229, 0.14), transparent 30%),
        radial-gradient(circle at 92% 6%, rgba(14, 165, 233, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.top-header {
    height: 64px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.24), transparent 30%),
        linear-gradient(180deg, #0f172a, #111827 62%, #0b1120);
}

.nav-item {
    margin: 4px 12px;
    padding: 11px 14px;
    border-left: none;
    border-radius: 14px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.nav-item.active {
    background: rgba(129, 140, 248, 0.18);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.24);
}

.main-content {
    max-width: 1520px;
    width: 100%;
}

.page-header {
    padding: 4px 2px 2px;
}

.page-header h1,
.page-header h2 {
    font-size: 28px;
    letter-spacing: -0.04em;
}

.page-desc {
    max-width: 860px;
    line-height: 1.7;
}

.card,
.stat-card,
.summary-card,
.chart-card,
.config-card,
.provider-card,
.prompt-card,
.account-card,
.content-card,
.list-item,
.result-box,
.schedule-calendar,
.schedule-list,
.stats-bar,
.modal-content {
    background: var(--surface-glass);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.card:hover,
.stat-card:hover,
.config-card:hover,
.provider-card:hover,
.prompt-card:hover,
.account-card:hover,
.content-card:hover,
.list-item:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.26);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.card-header,
.modal-header,
.modal-footer {
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(248,250,252,0.58));
    border-color: rgba(226, 232, 240, 0.7);
}

.card-header h3,
.chart-card h4,
.schedule-list h4 {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand-gradient);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
}

.btn-primary:hover:not(:disabled):not(.loading) {
    background: linear-gradient(135deg, #4338ca, #0284c7);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.30);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(148, 163, 184, 0.34);
}

.form-input,
.form-select,
.form-input-sm,
textarea.form-input {
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.form-input:focus,
.form-select:focus {
    border-color: rgba(79, 70, 229, 0.58);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.11);
}

.workflow-card {
    position: relative;
    overflow: hidden;
}

.workflow-card::before,
#workflow-progress::before,
#delivery-article-list::before,
#delivery-job-list::before {
    content: "";
    display: block;
    height: 4px;
    background: var(--brand-gradient);
}

.workflow-form,
.url-form {
    padding: 24px;
}

.platform-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-group-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 2px;
}

.platform-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.checkbox-label,
.checkbox-group .checkbox-item {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(255,255,255,0.7);
    transition: all var(--transition-base);
}

.checkbox-label:hover,
.checkbox-group .checkbox-item:hover {
    border-color: rgba(79, 70, 229, 0.36);
    transform: translateY(-1px);
}

.title-list {
    padding: 18px;
}

.title-item,
.title-option {
    border-radius: 18px;
    border-color: var(--border-soft);
    background: rgba(255,255,255,0.78);
}

.title-item:hover,
.title-item.selected,
.title-option:hover,
.title-option.selected {
    border-color: rgba(79, 70, 229, 0.42);
    background: rgba(238, 242, 255, 0.82);
}

.delivery-article-row {
    margin: 10px 14px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: rgba(255,255,255,0.64);
    content-visibility: auto;
    contain-intrinsic-size: 92px;
}

.delivery-workbench {
    min-height: calc(100vh - 230px);
}

.delivery-workbench-single {
    display: block;
}

.delivery-workbench-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.delivery-workbench-panel.delivery-panel-pulse,
.delivery-queue-item.delivery-panel-pulse {
    border-color: rgba(16,185,129,0.42);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.10);
}

.delivery-workbench-panel .card-header {
    flex: 0 0 auto;
}

.delivery-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.delivery-queue-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 10px;
    align-items: flex-start;
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px solid rgba(15,23,42,0.07);
    border-radius: 8px;
    background: #ffffff;
    content-visibility: auto;
    contain-intrinsic-size: 132px;
}

.delivery-queue-item:hover {
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.20);
}

.delivery-queue-main {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.delivery-queue-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.delivery-queue-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.delivery-queue-actions {
    width: 86px;
    display: grid;
    gap: 4px;
}

.delivery-queue-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 26px;
    padding: 4px 5px;
    font-size: 11px;
    line-height: 1.25;
}

.delivery-inline-tasks {
    display: grid;
    gap: 6px;
    margin-top: 2px;
}

.delivery-inline-task {
    display: grid;
    grid-template-columns: 88px auto auto minmax(120px, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 8px;
    background: #f8fafc;
}

.delivery-inline-task.is-empty {
    background: #ffffff;
}

.delivery-inline-platform {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.delivery-inline-hint {
    min-width: 0;
    color: #86868b;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-inline-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.delivery-mini-link.primary {
    background: rgba(79,70,229,0.11);
    color: #4338ca;
}

.delivery-mini-link.danger {
    background: rgba(239,68,68,0.09);
    color: #dc2626;
}

/* 发布队列是高频滚动页：禁用重视觉效果，优先保证滚动流畅。 */
body[data-active-section="delivery-publish"] {
    background: #f6f7f9;
}

body[data-active-section="delivery-publish"] .main-content {
    background: #f6f7f9;
}

body[data-active-section="delivery-publish"] .card,
body[data-active-section="delivery-publish"] #delivery-article-list,
body[data-active-section="delivery-publish"] .delivery-queue-item,
body[data-active-section="delivery-publish"] .delivery-inline-task {
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
}

body[data-active-section="delivery-publish"] .card:hover,
body[data-active-section="delivery-publish"] .delivery-queue-item:hover {
    transform: none;
    box-shadow: none;
}

body[data-active-section="delivery-publish"] #delivery-article-list {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

body[data-active-section="delivery-publish"] #delivery-article-list .card-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

body[data-active-section="delivery-publish"] .btn-primary {
    box-shadow: none;
    background: #4f46e5;
}

body[data-active-section="delivery-publish"] .btn-primary:hover:not(:disabled):not(.loading) {
    box-shadow: none;
    background: #4338ca;
}

body[data-active-section="delivery-publish"] .delivery-platform-badge,
body[data-active-section="delivery-publish"] .delivery-executor-chip,
body[data-active-section="delivery-publish"] .delivery-mini-link {
    box-shadow: none;
}

.delivery-workbench .delivery-article-row {
    align-items: flex-start;
    gap: 10px;
    margin: 8px 10px;
    padding: 12px;
    border-color: rgba(15,23,42,0.06);
    border-radius: 12px;
    box-shadow: none;
}

.delivery-workbench .delivery-article-info {
    min-width: 0;
}

.delivery-workbench .delivery-article-title {
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.delivery-workbench .delivery-article-meta {
    gap: 6px;
    line-height: 1.4;
}

.delivery-workbench .delivery-article-platforms {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.delivery-workbench .delivery-article-actions {
    width: 72px;
    flex: 0 0 72px;
    display: grid;
    gap: 4px;
}

.delivery-workbench .delivery-article-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 26px;
    padding: 4px 5px;
    font-size: 11px;
    line-height: 1.25;
}

.delivery-article-row:last-child {
    border-bottom: 1px solid transparent;
}

.delivery-article-row:hover {
    background: rgba(255,255,255,0.92);
    border-color: rgba(79, 70, 229, 0.20);
}

.delivery-platform-badge,
.config-badge,
.provider-badge {
    border-radius: 999px;
    font-weight: 700;
}

.artifact-item,
.platform-content-card,
.delivery-item {
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    border-color: var(--border-soft);
}

.settings-tabs,
.platform-tabs {
    padding: 6px;
    border-radius: 18px;
    background: rgba(255,255,255,0.62);
    border: 1px solid var(--border-soft);
}

.settings-tab,
.platform-tab,
.preview-tab {
    border-radius: 999px;
    border: 1px solid transparent;
}

.settings-tab.active,
.platform-tab.active,
.preview-tab.active {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
}

.config-card-details {
    background: rgba(248,250,252,0.72);
    border-radius: 16px;
}

.empty-state {
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.72);
    border: 1px dashed rgba(148, 163, 184, 0.42);
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.schedule-calendar,
.schedule-list {
    border-radius: 24px;
}

.calendar-grid {
    border-radius: 18px;
    background: rgba(226, 232, 240, 0.72);
}

.calendar-day {
    min-height: 112px;
    background: rgba(255,255,255,0.76);
}

.calendar-day.today {
    background: rgba(238, 242, 255, 0.95);
    box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.calendar-event {
    border-radius: 999px;
    padding: 3px 7px;
}

.analytics-summary {
    gap: 16px;
}

.summary-card {
    border-radius: 22px;
}

.phone-frame {
    border-width: 10px;
    border-color: #0f172a;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.30);
}

.phone-screen {
    background: #ffffff;
}

.result-summary-bar {
    background: rgba(255,255,255,0.70);
    border-color: var(--border-soft);
    border-radius: 20px;
}

.result-summary-bar .summary-item {
    border-radius: 16px;
    border-color: var(--border-soft);
}

.modal {
    background: rgba(15, 23, 42, 0.42);
}

.modal-content {
    overflow: hidden;
}

.modal-close {
    border-radius: 999px;
}

@media (max-width: 900px) {
    .page-header h1,
    .page-header h2 {
        font-size: 24px;
    }
    .delivery-article-row {
        margin: 8px;
    }
}

/* ========== 2026-05 发布与预览交互优化 ========== */
.top-header .header-right:empty {
    display: none;
}

.modal-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.phone-preview-section .phone-container {
    display: flex;
    justify-content: center;
    padding: 30px 0 36px;
    background:
        radial-gradient(circle at 50% 0%, rgba(99,102,241,.18), transparent 36%),
        linear-gradient(180deg, rgba(248,250,252,.88), rgba(255,255,255,.32));
    border: 1px solid rgba(226,232,240,.75);
    border-radius: 30px;
}

.phone-preview-section .phone-frame {
    width: 390px;
    height: 844px;
    padding: 5px;
    border: 1px solid rgba(15,23,42,.88);
    border-radius: 50px;
    overflow: hidden;
    background: linear-gradient(145deg, #171717, #050505 56%, #262626);
    box-shadow:
        0 30px 76px rgba(15,23,42,.28),
        0 0 0 1px rgba(255,255,255,.08),
        inset 0 1px 0 rgba(255,255,255,.22);
}

.phone-preview-section .phone-notch {
    width: 118px;
    height: 34px;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    border-radius: 999px;
    background: #050505;
    box-shadow:
        inset 0 -1px 0 rgba(255,255,255,.10),
        0 1px 2px rgba(0,0,0,.18);
    z-index: 20;
}

.phone-preview-section .phone-screen {
    height: 100%;
    border-radius: 45px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
    display: flex;
    flex-direction: column;
}

.phone-preview-section .phone-status-bar {
    height: 44px;
    padding: 0 26px;
    align-items: center;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 650;
    color: #333;
    background: #fff;
    border-bottom: 0;
    flex: 0 0 auto;
}

.phone-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 72px;
    justify-content: flex-end;
}

.phone-wifi-icon {
    flex-shrink: 0;
}

.phone-battery-icon {
    width: 22px;
    height: 11px;
    border: 1.5px solid #333;
    border-radius: 3px;
    padding: 1.5px;
    position: relative;
    display: inline-flex;
    align-items: center;
}
.phone-battery-icon::after {
    content: "";
    position: absolute;
    right: -4.5px;
    top: 3px;
    width: 2px;
    height: 4px;
    border-radius: 0 1px 1px 0;
    background: #333;
}
.phone-battery-icon span {
    display: block;
    height: 100%;
    border-radius: 1.5px;
    background: #333;
}

.phone-battery-pct {
    font-size: 11px;
    font-weight: 600;
    color: #333;
}

.phone-preview-section .phone-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    background: #fff;
}

.phone-preview-section .phone-content:has(.douyin-preview),
.phone-preview-section .phone-content:has(.wechat-channels-preview) {
    background: #000;
}

.phone-preview-section .phone-content .douyin-preview,
.phone-preview-section .phone-content .wechat-channels-preview {
    height: 100%;
}

.phone-preview-section .phone-content .douyin-screen,
.phone-preview-section .phone-content .channels-screen {
    height: 100%;
    aspect-ratio: unset;
}

.phone-preview-section .wechat-cover img,
.phone-preview-section .xhs-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-preview-section .wechat-title {
    padding: 22px 18px 8px;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.34;
    letter-spacing: 0;
    color: #111827;
}

.phone-preview-section .wechat-summary {
    margin: 12px 18px 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #64748b;
    background: #f7f7f7;
    border-radius: 4px;
}

.phone-preview-section .wechat-body {
    padding: 10px 18px 18px;
    font-size: 15px;
    line-height: 1.86;
    color: #273449;
}

.phone-preview-section .wechat-body p {
    margin-bottom: 14px;
}

.phone-preview-section .xhs-cover-placeholder {
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.44), transparent 26%),
        linear-gradient(135deg, #ff2442, #ff8a65);
    font-weight: 850;
}

.phone-preview-section .xhs-content {
    padding: 14px 16px 18px;
}

.phone-preview-section .xhs-title {
    font-size: 17px;
    line-height: 1.45;
    font-weight: 800;
    color: #111827;
}

.phone-preview-section .xhs-tags {
    color: #2563eb;
}

.delivery-job-row {
    align-items: center;
}

.delivery-job-row.is-cancelled {
    opacity: .66;
    background: rgba(248,250,252,.72);
}

.delivery-job-meta,
.delivery-job-hint {
    gap: 10px;
}

.delivery-job-hint {
    margin-top: 6px;
    color: #64748b;
}

.delivery-inline-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.delivery-article-title .delivery-platform-badge {
    margin-left: 8px;
    vertical-align: middle;
}

.delivery-article-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 360px;
}

.delivery-job-detail-modal {
    max-width: 980px;
}

.delivery-job-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.delivery-job-info-card {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
}

.detail-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.delivery-job-detail-note {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(238,242,255,.72);
    color: #334155;
    border: 1px solid rgba(99,102,241,.16);
    margin-bottom: 14px;
}

.delivery-job-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.payload-panel {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
}

.payload-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--border-soft);
}

.payload-panel-header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.payload-code {
    max-height: 360px;
    overflow: auto;
    margin: 0;
    padding: 16px;
    color: #e2e8f0;
    background: #0f172a;
    font-size: 12px;
    line-height: 1.62;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 640px) {
    .phone-preview-section .phone-frame {
        width: min(360px, calc(100vw - 46px));
        height: 660px;
    }
    .delivery-article-actions {
        justify-content: flex-start;
        max-width: none;
    }
}

/* Compact delivery preview modal */
.delivery-preview-summary {
    margin: 0 0 12px;
    border: 1px solid rgba(226,232,240,.92);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.delivery-preview-summary summary {
    min-height: 42px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.delivery-preview-summary summary::-webkit-details-marker { display: none; }
.delivery-preview-summary summary::after {
    content: "展开";
    margin-left: auto;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.delivery-preview-summary[open] summary::after { content: "收起"; }
.delivery-preview-summary-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.delivery-preview-summary-meta {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.delivery-preview-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(120px, .8fr) minmax(160px, 1fr);
    gap: 8px;
    padding: 0 12px 12px;
}
.delivery-preview-summary-grid div {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,.9);
}
.delivery-preview-summary-grid span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: #64748b;
}
.delivery-preview-summary-grid strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #0f172a;
}
.delivery-preview-modal-content { max-height: 94vh; }
#delivery-preview-modal .modal-header { padding: 12px 18px; }
#delivery-preview-modal .modal-body { padding: 12px 16px; }
#delivery-preview-modal .modal-footer { padding: 10px 16px; }
#delivery-preview-modal .delivery-preview-modal-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#delivery-preview-modal .delivery-preview-summary {
    flex: 0 0 auto;
    margin-bottom: 8px;
    border-radius: 8px;
}
#delivery-preview-modal .delivery-preview-summary summary {
    min-height: 34px;
    padding: 6px 10px;
}
#delivery-preview-modal .delivery-preview-summary-title {
    flex: 0 0 auto;
    font-size: 12px;
}
#delivery-preview-modal .delivery-preview-summary-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
#delivery-preview-modal .delivery-preview-summary-grid { padding: 0 10px 10px; }
#delivery-preview-modal .phone-preview-section { margin-bottom: 0; }
#delivery-preview-modal .preview-header {
    justify-content: flex-end;
    margin-bottom: 8px;
}
#delivery-preview-modal .preview-header h3 { display: none; }
#delivery-preview-modal .preview-platform-tabs {
    flex-wrap: wrap;
    justify-content: flex-end;
}
#delivery-preview-modal .preview-tab {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
}
#delivery-preview-modal .phone-preview-section .phone-container {
    padding: 10px 0 14px;
    border-radius: 16px;
}
#delivery-preview-modal .phone-preview-section .phone-frame {
    width: clamp(280px, 36vw, 375px);
    height: clamp(460px, calc(100vh - 280px), 667px);
    border-radius: 40px;
}
#delivery-preview-modal .phone-preview-section .phone-notch {
    width: 96px;
    height: 28px;
    top: 12px;
}
#delivery-preview-modal .phone-preview-section .phone-screen { border-radius: 37px; }

#delivery-preview-modal .phone-content:has(.douyin-preview),
#delivery-preview-modal .phone-content:has(.wechat-channels-preview) {
    background: #000;
}

#delivery-preview-modal .phone-content .douyin-preview,
#delivery-preview-modal .phone-content .wechat-channels-preview {
    height: 100%;
}

#delivery-preview-modal .phone-content .douyin-screen,
#delivery-preview-modal .phone-content .channels-screen {
    height: 100%;
    aspect-ratio: unset;
}
#delivery-preview-modal .phone-preview-section .phone-status-bar {
    height: 40px;
    padding: 0 24px;
}

.delivery-platform-badge.cancelled {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

/* ========== 2026-05 Apple 浅色导航修正：覆盖误用深色菜单 ========== */
body {
    background:
        radial-gradient(1000px 420px at -12% -8%, rgba(255,255,255,.96), transparent 62%),
        radial-gradient(900px 420px at 108% -10%, rgba(232,240,255,.92), transparent 58%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.top-header {
    height: 64px;
    background: rgba(255, 255, 255, 0.76);
    color: #111827;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(24px) saturate(1.25);
    -webkit-backdrop-filter: blur(24px) saturate(1.25);
}

.logo span,
.header-status,
.header-btn {
    color: #111827;
}

.sidebar {
    background: rgba(255, 255, 255, 0.74);
    border-right: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 10px 0 28px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(24px) saturate(1.22);
    -webkit-backdrop-filter: blur(24px) saturate(1.22);
}

.nav-group-title {
    color: #98a2b3;
    font-weight: 800;
    letter-spacing: .08em;
}

.nav-item {
    margin: 4px 12px;
    padding: 11px 14px;
    border-left: none;
    border-radius: 14px;
    color: #4b5563;
    background: transparent;
    box-shadow: none;
}

.nav-item .nav-icon,
.nav-item .nav-text {
    color: inherit;
}

.nav-item:hover {
    background: rgba(10, 132, 255, 0.08);
    color: #1f2937;
    transform: translateX(1px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.15), rgba(10, 132, 255, 0.07));
    color: #0a84ff;
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.16), 0 10px 24px rgba(10,132,255,.08);
}

/* ========== 2026-05 仪表盘 Apple Light Refinement ========== */
:root {
    --apple-bg: #f5f5f7;
    --apple-card: rgba(255, 255, 255, 0.78);
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-shadow: 0 22px 70px rgba(0, 0, 0, 0.08);
    --apple-blue: #007aff;
    --apple-green: #34c759;
    --apple-orange: #ff9500;
    --apple-purple: #af52de;
}

body {
    background:
        radial-gradient(1100px 520px at 82% -10%, rgba(0, 122, 255, 0.12), transparent 62%),
        radial-gradient(820px 420px at 8% 0%, rgba(175, 82, 222, 0.10), transparent 58%),
        linear-gradient(180deg, #ffffff 0%, var(--apple-bg) 48%, #f2f2f7 100%);
}

.top-header {
    height: 60px;
    background: rgba(255, 255, 255, 0.78);
    color: #1d1d1f;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.logo,
.header-status,
.header-btn { color: #1d1d1f; }
.logo svg rect { fill: #007aff; }

.sidebar {
    background: rgba(255, 255, 255, 0.72);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.nav-group-title { color: #86868b; letter-spacing: 0.10em; }
.nav-item {
    color: #3a3a3c;
    border-left: none;
    border-radius: 14px;
    margin: 4px 12px;
    padding: 11px 14px;
}
.nav-item:hover { background: rgba(0, 122, 255, 0.07); color: #1d1d1f; transform: none; }
.nav-item.active {
    background: rgba(0, 122, 255, 0.11);
    color: #0066cc;
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.12);
}
.main-content { background: transparent; }

.dashboard-hero {
    position: relative;
    padding: 28px;
    margin-bottom: 18px;
    border-radius: 32px;
    background:
        radial-gradient(800px 220px at 100% 0%, rgba(0, 122, 255, 0.14), transparent 60%),
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.66));
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--apple-shadow);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.dashboard-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 122, 255, 0.10);
    color: #0066cc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dashboard-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 1.05;
    color: #1d1d1f;
}
.dashboard-hero .page-desc { max-width: 760px; margin-top: 10px; color: #6e6e73; font-size: 15px; }

.dashboard-status-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--apple-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    color: #6e6e73;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
}
.dashboard-status-main { display: inline-flex; align-items: center; gap: 9px; color: #1d1d1f; font-size: 13px; font-weight: 700; }
.dashboard-status-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--apple-green); box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.12); }
.dashboard-baseline-note { font-size: 13px; text-align: right; }

.stats-grid { gap: 16px; margin-bottom: 18px; }
.stat-card {
    position: relative;
    min-height: 172px;
    padding: 20px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: var(--apple-card);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.stat-card::after { content: ""; position: absolute; right: -34px; top: -34px; width: 124px; height: 124px; border-radius: 999px; background: rgba(0, 122, 255, 0.12); }
.stat-card-success::after { background: rgba(52, 199, 89, 0.13); }
.stat-card-warning::after { background: rgba(255, 149, 0, 0.14); }
.stat-card-info::after { background: rgba(175, 82, 222, 0.13); }
.stat-title { color: #6e6e73; font-size: 13px; font-weight: 700; }
.stat-badge { border-radius: 999px; padding: 4px 9px; font-size: 11px; }
.stat-badge.primary { background: rgba(0, 122, 255, 0.10); color: #0066cc; }
.stat-badge.success { background: rgba(52, 199, 89, 0.12); color: #248a3d; }
.stat-badge.warning { background: rgba(255, 149, 0, 0.13); color: #b25f00; }
.stat-badge.info { background: rgba(175, 82, 222, 0.12); color: #8e44ad; }
.stat-value { font-size: 46px; line-height: 1; font-weight: 780; letter-spacing: -0.055em; color: #1d1d1f; }
.stat-footer { margin-top: 12px; color: #86868b; font-size: 13px; }

.dashboard-grid { gap: 18px; }
.dashboard-action-card,
.dashboard-recent-card {
    border-radius: 28px;
    background: var(--apple-card);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.07);
}
.dashboard-action-card .card-header,
.dashboard-recent-card .card-header { padding: 18px 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.quick-actions { gap: 12px; padding: 16px; }
.quick-actions .quick-action-btn {
    min-height: 148px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    background: radial-gradient(circle at 100% 0%, rgba(0,122,255,0.12), transparent 46%), rgba(255,255,255,0.74);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}
.quick-actions .quick-action-btn:hover { transform: translateY(-2px); border-color: rgba(0, 122, 255, 0.20); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08); }
.quick-actions .action-icon { width: 46px; height: 46px; border-radius: 16px; background: rgba(0, 122, 255, 0.10); color: #0066cc; }
.action-copy { display: flex; flex-direction: column; gap: 5px; }
.action-copy strong { color: #1d1d1f; font-size: 15px; letter-spacing: -0.01em; }
.action-copy small { color: #86868b; font-size: 12px; line-height: 1.45; }

@media (max-width: calc(var(--layout-stack-bp) + var(--app-sidebar-width))) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .dashboard-hero,
    .dashboard-status-strip { flex-direction: column; align-items: flex-start; }
    .dashboard-baseline-note { text-align: left; }
    .stats-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}

/* ========== 2026-05 发布任务中心交互修正 ========== */
.delivery-job-group-summary {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.38);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.delivery-job-group-card {
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}

.delivery-job-group-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.delivery-job-group-title strong {
    color: #1d1d1f;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.delivery-job-group-title span {
    color: #86868b;
    font-size: 12px;
    white-space: nowrap;
}

.delivery-job-group-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.delivery-group-platform {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.delivery-mini-link {
    border: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,122,255,0.09);
    color: #0066cc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.delivery-mini-link:hover {
    background: rgba(0,122,255,0.15);
}

.delivery-confirm-modal {
    max-width: 520px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.78);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 30px 90px rgba(0,0,0,0.18);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.delivery-confirm-body {
    padding: 2px 0;
    color: #3a3a3c;
    font-size: 15px;
    line-height: 1.8;
}

.delivery-confirm-body p {
    margin: 0;
}

.delivery-confirm-modal .modal-footer {
    background: rgba(248,248,250,0.78);
}

/* ========== 2026-05 发布任务批次视图 ========== */
.delivery-job-batch-list {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.delivery-job-batch-card {
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.88);
    box-shadow: none;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 176px;
}

.delivery-list-footer {
    display: flex;
    justify-content: center;
    padding: 14px 16px 18px;
}

.delivery-pagination {
    align-items: center;
    gap: 10px;
}

.delivery-page-indicator {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    min-width: 56px;
    text-align: center;
}

.delivery-job-batch-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(248,250,252,0.88);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.delivery-job-batch-kicker {
    margin-bottom: 6px;
    color: #007aff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.delivery-job-batch-header h3 {
    margin: 0;
    max-width: 780px;
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

.delivery-job-batch-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 160px;
    color: #86868b;
    font-size: 12px;
}

.delivery-job-batch-meta strong {
    color: #1d1d1f;
    font-size: 13px;
}

.delivery-platform-task-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.delivery-platform-task {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.055);
    border-radius: 10px;
    background: rgba(248,250,252,0.86);
}

.delivery-platform-task.is-cancelled {
    opacity: 0.72;
    background: rgba(248,250,252,0.56);
}

.delivery-platform-task-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.delivery-platform-name {
    color: #111827;
    font-size: 13px;
    font-weight: 850;
}

.delivery-executor-chip {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.05);
    color: #6e6e73;
    font-size: 12px;
    font-weight: 700;
}

.delivery-platform-task-title {
    color: #334155;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.delivery-platform-task-hint {
    color: #86868b;
    font-size: 12px;
    line-height: 1.55;
}

.delivery-platform-task-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 12px;
}

.delivery-platform-task-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 260px;
}

.delivery-platform-task-actions .btn {
    padding: 6px 8px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .delivery-workbench {
        min-height: auto;
    }
    .delivery-queue-item,
    .delivery-inline-task {
        grid-template-columns: 1fr;
    }
    .delivery-queue-actions,
    .delivery-inline-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .delivery-queue-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .delivery-panel-scroll {
        max-height: none;
        min-height: 0;
        overflow: visible;
    }
    .delivery-job-batch-header,
    .delivery-platform-task {
        grid-template-columns: 1fr;
        display: grid;
    }
    .delivery-job-batch-header {
        display: flex;
        flex-direction: column;
    }
    .delivery-job-batch-meta {
        align-items: flex-start;
    }
    .delivery-platform-task-actions {
        justify-content: flex-start;
        max-width: 100%;
    }
}

/* ========== 2026-05 仪表盘字号收敛 ========== */
.dashboard-hero {
    padding: 20px 22px;
    border-radius: 22px;
}

.dashboard-hero h1 {
    font-size: 26px;
    line-height: 1.16;
    font-weight: 740;
    letter-spacing: -0.03em;
}

.dashboard-hero .page-desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.dashboard-kicker {
    font-size: 11px;
    padding: 4px 9px;
}

.stat-card {
    min-height: 126px;
    padding: 16px;
    border-radius: 20px;
}

.stat-card::after {
    width: 82px;
    height: 82px;
}

.stat-value {
    font-size: 30px;
    line-height: 1.08;
    font-weight: 740;
    letter-spacing: -0.03em;
}

.stat-title {
    font-size: 12px;
}

.stat-footer {
    margin-top: 6px;
    font-size: 12px;
}

.dashboard-status-strip {
    padding: 9px 12px;
    border-radius: 16px;
}

/* ========== 状态徽章 ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.status-badge.pending {
    background: #f5f5f5;
    color: #999;
}
.status-badge.crawling {
    background: #e6f7ff;
    color: #1890ff;
}
.status-badge.completed {
    background: #f6ffed;
    color: #52c41a;
}
.status-badge.failed {
    background: #fff2f0;
    color: #ff4d4f;
}

/* ========== 空白状态引导 ========== */
.empty-state-guide {
    padding: 32px 20px;
    text-align: center;
}
.empty-state-guide .guide-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.empty-state-guide h4 { font-size: 16px; margin: 0 0 8px; color: var(--text-primary); }
.empty-state-guide p { font-size: 13px; color: var(--text-secondary); margin: 0 0 4px; line-height: 1.6; }
.empty-state-guide .guide-steps { text-align: left; max-width: 360px; margin: 16px auto; padding: 0; list-style: none; }
.empty-state-guide .guide-steps li { padding: 6px 0; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.empty-state-guide .guide-steps li .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ========== 采集提示弹窗 ========== */
.collect-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(2px);
}
.collect-prompt-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 20px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
}
.collect-prompt-box .prompt-icon { font-size: 36px; margin-bottom: 8px; }
.collect-prompt-box h4 { margin: 0 0 6px; font-size: 16px; }
.collect-prompt-box p { color: var(--text-secondary); font-size: 13px; margin: 0 0 16px; }
.collect-prompt-box .prompt-actions { display: flex; gap: 8px; justify-content: center; }
.collect-prompt-box .prompt-actions .btn { min-width: 100px; }


/* ========== 状态徽章 ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.status-badge.pending {
    background: #f5f5f5;
    color: #999;
}
.status-badge.crawling {
    background: #e6f7ff;
    color: #1890ff;
}
.status-badge.completed {
    background: #f6ffed;
    color: #52c41a;
}
.status-badge.failed {
    background: #fff2f0;
    color: #ff4d4f;
}

/* ========== 分析状态标签 ========== */
.analysis-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}
.analysis-badge.analyzed { background: #f0f5ff; color: #2f54eb; }
.analysis-badge.processing { background: #fff7e6; color: #fa8c16; }
.analysis-badge.pending { background: #f5f5f5; color: #999; }

/* ========== 空状态引导卡片 ========== */
.empty-state-guide {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}
.empty-state-guide .guide-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}
.empty-state-guide h3 {
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--text-primary);
}
.empty-state-guide p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    line-height: 1.6;
}
.empty-state-guide .guide-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.empty-state-guide .guide-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.empty-state-guide .guide-step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.empty-state-guide .guide-step .step-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== 加入素材库按钮 ========== */
.btn-add-to-material {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-base);
}
.btn-add-to-material:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0f5ff;
}

/* ========== 热点搜索错误提示差异 ========== */
.hot-error {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.hot-error.api-error {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #d46b08;
}
.hot-error.no-data {
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    color: #999;
}
.hot-error.network-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

/* ========== 采集后提示框 ========== */
.collect-prompt-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.collect-prompt-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}
.collect-prompt-box h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.collect-prompt-box p {
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.collect-prompt-box .prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========== 内容卡片增强 ========== */
.content-card {
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.content-card .viral-badge-inline {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}


/* ========== 全链路一键创作按钮 ========== */
.btn-full-auto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-full-auto {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(102,126,234,0.3);
}
.btn-full-auto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}
.btn-full-auto:active {
    transform: translateY(0);
}

/* topic-item 中的按钮 */
.topic-item .btn-full-auto {
    margin-top: 6px;
    align-self: flex-start;
}

/* content-card-actions 中的按钮 */
.btn.btn-sm.btn-primary.btn-full-auto {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(102,126,234,0.3);
}
.btn.btn-sm.btn-primary.btn-full-auto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* ========== 工作流进度弹窗 ========== */
.workflow-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}
.workflow-progress-overlay.hiding {
    animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.workflow-progress-modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.progress-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}
.progress-badge {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.progress-badge.running {
    background: #e6f7ff;
    color: #1890ff;
}
.progress-badge.done {
    background: #f6ffed;
    color: #52c41a;
}
.progress-badge.failed {
    background: #fff2f0;
    color: #ff4d4f;
}

.progress-source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 13px;
}
.progress-label {
    color: #999;
    font-weight: 500;
}
.progress-value {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal overlay progress - scoped to avoid overriding sidebar horizontal layout */
.workflow-progress-modal .progress-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
    min-width: 0;
    padding: 0;
}
.workflow-progress-modal .progress-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    color: #bbb;
    transition: all 0.3s ease;
    min-width: 0;
    opacity: 1;
}
.workflow-progress-modal .progress-step.active {
    color: #1890ff;
    background: #e6f7ff;
    font-weight: 600;
}
.workflow-progress-modal .progress-step.done {
    color: #52c41a;
}
.workflow-progress-modal .progress-step .step-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.progress-bar {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.progress-percent {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    min-width: 36px;
    text-align: right;
}

.progress-message {
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.progress-footer {
    display: flex;
    justify-content: flex-end;
}
.btn-close-progress {
    padding: 6px 20px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.btn-close-progress:hover {
    border-color: #667eea;
    color: #667eea;
}
.btn-close-progress.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}
.btn-close-progress.primary:hover {
    box-shadow: 0 2px 8px rgba(102,126,234,0.4);
}

/* ====== Pipeline Result Card ====== */
.pipeline-result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.btn-pipeline-action {
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    color: var(--text-primary);
}
.btn-pipeline-action:hover {
    background: var(--border-light);
}
.pipeline-platform-tab.active {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}
.pipeline-platform-tab:hover:not(.active) {
    background: var(--border-light);
}
.pipeline-content-preview {
    position: relative;
}
.pipeline-content-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: linear-gradient(transparent, var(--card-bg));
    pointer-events: none;
}

/* ====== Wechatsync MCP Publish ====== */
.btn-ws-publish {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}
.btn-ws-publish:hover:not(:disabled) {
    background: #4f46e5;
    color: #fff;
}
.btn-ws-publish:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ws-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s ease;
}
#ws-publish-status {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    min-height: 16px;
}
#ws-publish-status span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 个人知识库样式 ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

#knowledge-base .stats-grid {
    margin-bottom: var(--space-lg);
}

#knowledge-base .stats-grid .stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-light);
    min-height: auto;
}

#knowledge-base .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

#knowledge-base .stat-info { flex: 1; }

#knowledge-base .stats-grid .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

#knowledge-base .stats-grid .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* IP 对话侧栏 */
.interview-panel {
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    z-index: 200;
    flex-direction: column;
}

.interview-panel.is-open {
    display: flex;
}

.kb-entry {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.kb-entry:last-child { border-bottom: none; }

.interview-message {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.interview-message.assistant {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-top-left-radius: 4px;
}

.interview-message.user {
    background: var(--success-bg);
    color: #166534;
    border-top-right-radius: 4px;
    text-align: right;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay > .modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-overlay .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-overlay .modal-close:hover { color: var(--text-primary); }

.modal-overlay .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ========== UI layout stabilization ========== */
.card,
.stat-card,
.summary-card,
.chart-card,
.config-card,
.provider-card,
.prompt-card,
.account-card,
.content-card,
.list-item,
.result-box,
.schedule-calendar,
.schedule-list,
.stats-bar,
.modal-content {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.card:hover,
.stat-card:hover,
.config-card:hover,
.provider-card:hover,
.prompt-card:hover,
.account-card:hover,
.content-card:hover,
.list-item:hover {
    transform: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.btn,
.form-input,
.form-select,
.form-textarea {
    border-radius: 8px;
}

.modal:not(.modal-overlay > .modal) {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    background: rgba(15, 23, 42, 0.48);
    border-radius: 0;
    box-shadow: none;
    z-index: 2000;
}

.modal:not(.modal-overlay > .modal) > .modal-content {
    width: min(92vw, 760px);
    max-height: min(90vh, 920px);
    margin: auto;
    overflow: hidden;
}

.modal-content.modal-large {
    width: min(94vw, 1040px);
    max-width: 1040px;
}

.modal-header,
.modal-footer {
    min-height: 56px;
    padding: 14px 20px;
}

.modal-body {
    min-width: 0;
}

#delivery-preview-modal {
    padding: 18px;
}

#delivery-preview-modal.modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 18px !important;
    overflow: auto !important;
    background: rgba(15, 23, 42, 0.48) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 3000 !important;
}

#delivery-preview-modal .delivery-preview-modal-content {
    width: min(96vw, 980px) !important;
    max-width: 980px !important;
    max-height: 94vh !important;
    margin: auto !important;
    opacity: 1 !important;
}

#delivery-preview-modal .modal-body {
    padding: 12px;
}

#delivery-preview-modal .delivery-preview-modal-view,
#delivery-preview-modal .phone-preview-section {
    min-width: 0;
}

#delivery-preview-modal .preview-header {
    align-items: flex-start;
    gap: 8px;
}

#delivery-preview-modal .preview-platform-tabs {
    width: 100%;
    justify-content: center;
}

#delivery-preview-modal .phone-preview-section .phone-container {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
}

#delivery-preview-modal .phone-preview-section .phone-frame {
    width: min(375px, calc(100vw - 84px));
    height: min(600px, calc(100vh - 320px));
    min-height: 430px;
}

body[data-active-section="delivery-publish"] .page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

body[data-active-section="delivery-publish"] #delivery-article-list {
    border-radius: 8px;
}

.delivery-queue-item {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
}

.delivery-queue-item:last-child {
    border-bottom: 0;
}

.delivery-inline-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.delivery-inline-task {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 28px;
    gap: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f8fafc;
}

.delivery-inline-platform {
    white-space: nowrap;
}

.delivery-inline-hint {
    display: none;
}

.delivery-inline-actions {
    display: inline-flex;
}

.delivery-mini-link {
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.recent-delivery-item {
    border-radius: 8px;
    padding: 10px 12px;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.recent-delivery-item:hover,
.recent-delivery-item:focus-visible {
    background: #f8fafc;
    outline: none;
    transform: translateX(2px);
}

.recent-delivery-item:focus-visible {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

@media (max-width: 640px) {
    .modal:not(.modal-overlay > .modal) {
        padding: 10px;
    }

    .modal:not(.modal-overlay > .modal) > .modal-content {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    #delivery-preview-modal .phone-preview-section .phone-frame {
        width: min(330px, calc(100vw - 48px));
        height: min(560px, calc(100vh - 270px));
        min-height: 390px;
    }

    .delivery-queue-item {
        grid-template-columns: 1fr;
    }

    .delivery-queue-actions {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ========== Mobile navigation drawer ========== */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav-backdrop {
    display: none;
}

@media (max-width: 768px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    .top-header {
        min-height: 60px;
        padding: 0 14px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.10);
        color: var(--header-text);
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    body.mobile-nav-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.mobile-nav-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        width: min(82vw, 300px);
        max-width: 300px;
        padding: 16px 0 max(16px, env(safe-area-inset-bottom));
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        z-index: 1200;
        box-shadow: 24px 0 48px rgba(15, 23, 42, 0.22);
        border-right: 1px solid rgba(15, 23, 42, 0.10);
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 60px 0 0 0;
        z-index: 1190;
        background: rgba(15, 23, 42, 0.34);
        backdrop-filter: blur(3px);
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        display: block;
    }

    .main-content {
        grid-column: 1;
    }
}
