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

/* GEO data pages */
.geo-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.geo-kpi-card,
.geo-empty-panel,
.geo-config-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.geo-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
}

.geo-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6f4ff;
    color: #1677ff;
    font-size: 20px;
    flex: 0 0 48px;
}

.geo-kpi-icon.green {
    background: #f6ffed;
    color: #389e0d;
}

.geo-kpi-icon.orange {
    background: #fff7e6;
    color: #d46b08;
}

.geo-kpi-icon.purple {
    background: #f9f0ff;
    color: #722ed1;
}

.geo-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.geo-kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.geo-kpi-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 3px;
}

.geo-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px 22px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.geo-filter-bar label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.geo-filter-bar .form-input {
    width: auto;
    min-width: 136px;
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
}

.geo-filter-bar select.form-input {
    min-width: 150px;
}

.geo-date-shortcuts {
    display: flex;
    gap: 6px;
}

.geo-date-shortcut {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
}

.geo-date-shortcut:hover,
.geo-date-shortcut.active {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
}

.geo-filter-divider {
    width: 1px;
    height: 22px;
    background: var(--border-color);
}

.geo-empty-panel {
    min-height: 260px;
    padding: 44px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.geo-empty-panel > i {
    font-size: 34px;
    color: #91caff;
}

.geo-config-section {
    margin-bottom: 20px;
    overflow: hidden;
}

.geo-config-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.geo-config-section-header i {
    color: #1677ff;
}

.geo-config-section-body {
    padding: 22px;
}

.geo-config-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.geo-config-grid.compact {
    grid-template-columns: repeat(2, minmax(180px, 260px));
}

.geo-progress-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
}

.geo-progress-list {
    display: grid;
    gap: 10px;
}

.geo-progress-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    padding: 14px 16px;
}

.geo-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.geo-progress-title {
    font-weight: 600;
    color: var(--text-primary);
}

.geo-progress-time {
    color: var(--text-tertiary);
    font-size: 12px;
    margin-top: 3px;
}

.geo-progress-status {
    padding: 4px 8px;
    border-radius: 6px;
    background: #f7f9fc;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.geo-progress-status.running {
    background: #e6f4ff;
    color: #1677ff;
}

.geo-progress-status.completed {
    background: #f6ffed;
    color: #389e0d;
}

.geo-progress-status.failed,
.geo-progress-status.partial_failed {
    background: #fff1f0;
    color: #cf1322;
}

.geo-progress-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.geo-progress-metric {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f7f9fc;
}

.geo-progress-metric strong {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.2;
}

.geo-progress-metric span {
    display: block;
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.geo-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 10px;
}

.geo-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f7f9fc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
}

.geo-tag-index {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.geo-tag-remove {
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px;
}

.geo-tag-remove:hover {
    color: #e53935;
}

.geo-inline-add {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
}

.geo-inline-add.wide {
    max-width: 520px;
}

.geo-inline-add .form-input {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.geo-inline-add .btn {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.geo-keyword-group-list,
.geo-platform-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.geo-keyword-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
}

.geo-keyword-card:hover,
.geo-keyword-card.selected {
    border-color: #1677ff;
    background: #e6f4ff;
}

.geo-keyword-card input {
    accent-color: #1677ff;
}

.geo-platform-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
}

.geo-platform-btn.selected {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
}

.geo-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 36px;
    align-items: center;
}

.geo-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.geo-radio-item:hover,
.geo-radio-item:has(input:checked) {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
}

.geo-radio-item input {
    accent-color: #1677ff;
    cursor: pointer;
}

.geo-schedule-toggle {
    height: 38px;
    margin: 0;
    font-weight: 600;
}

.geo-config-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 22px;
    background: #fafafa;
    border-top: 1px solid var(--border-color);
}

.geo-config-status,
.geo-config-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.geo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d9d9d9;
    display: inline-block;
}

.geo-status-dot.active {
    background: #52c41a;
}

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

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

.geo-cost strong {
    color: #fa8c16;
    font-size: 16px;
}

.geo-citation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.geo-overview-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.geo-overview-chart-wrap {
    height: 280px;
    min-height: 280px;
}

.geo-citation-chart-wrap {
    height: 260px;
    min-height: 260px;
}

.geo-citation-chart-wrap.small {
    height: 220px;
    min-height: 220px;
}

.geo-site-share-inner {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.geo-site-share-chart {
    flex: 0 0 200px;
    height: 200px;
    min-height: 200px;
}

.geo-site-share-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.geo-site-share-list::-webkit-scrollbar {
    width: 4px;
}

.geo-site-share-list::-webkit-scrollbar-track {
    background: transparent;
}

.geo-site-share-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.geo-brand-rate-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.geo-brand-rate-chart {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    min-height: 200px;
}

.geo-brand-rate-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-color: #e0e0e0 transparent;
    scrollbar-width: thin;
}

.geo-brand-rate-list::-webkit-scrollbar {
    width: 4px;
}

.geo-brand-rate-list::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: #e0e0e0;
}

.geo-site-share-item,
.geo-brand-rate-item {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.geo-brand-rate-item {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    font-family: inherit;
}

.geo-brand-rate-item.is-clickable {
    cursor: pointer;
}

.geo-brand-rate-item.is-clickable:hover .geo-brand-rate-name {
    color: var(--primary-color);
}

.geo-brand-rate-item:disabled {
    opacity: 1;
}

.geo-site-share-name,
.geo-brand-rate-name {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geo-share-bar {
    height: 8px;
    border-radius: 999px;
    background: #f0f2f5;
    overflow: hidden;
}

.geo-share-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: #1677ff;
}

.geo-share-percent {
    color: var(--text-primary);
    font-weight: 700;
    min-width: 54px;
    text-align: right;
}

.geo-citation-total {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
}

.geo-citation-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    margin-left: 10px;
    padding: 0 12px;
    border: 1px solid #1677ff;
    border-radius: 6px;
    background: #fff;
    color: #1677ff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.geo-citation-export-btn:hover:not(:disabled) {
    background: #e6f4ff;
}

.geo-citation-export-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.geo-citation-page-size {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

.geo-citation-page-size .form-input {
    width: 92px;
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
}

.geo-citation-table-wrap {
    overflow-x: auto;
}

.geo-citation-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 1100px;
}

.geo-citation-table th,
.geo-citation-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 13px;
    color: var(--text-secondary);
    vertical-align: middle;
}

.geo-citation-table th {
    background: #fafafa;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.geo-citation-title {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.geo-platform-pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: 6px;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
    white-space: nowrap;
}

.geo-link {
    color: #1677ff;
    text-decoration: none;
    white-space: nowrap;
}

.geo-link:hover {
    color: #0958d9;
}

.geo-table-empty {
    height: 120px;
    text-align: center !important;
    color: var(--text-tertiary) !important;
}

.geo-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
}

.geo-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}

.geo-page-btn:hover,
.geo-page-btn.active {
    border-color: #1677ff;
    color: #1677ff;
    background: #e6f4ff;
}

.geo-page-btn:disabled {
    cursor: not-allowed;
    color: var(--text-tertiary);
    background: #f5f5f5;
}

.geo-page-info {
    margin-left: 8px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
}

.geo-page-ellipsis {
    color: var(--text-tertiary);
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

@media (max-width: 1100px) {
    .geo-placeholder-grid,
    .geo-config-grid,
    .geo-citation-grid,
    .geo-overview-chart-grid {
        grid-template-columns: 1fr;
    }

    .geo-config-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .geo-progress-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .geo-progress-head,
    .geo-progress-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #096dd9;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --border-color: #e8e8e8;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 72px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 顶部导航栏 */
.top-header {
    height: 64px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-active) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb span::after {
    content: ' / ';
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb span:last-child::after {
    content: '';
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-info i {
    font-size: 18px;
    color: var(--primary-color);
}

.user-info:hover {
    background: var(--bg-secondary);
}


/* 主容器 */
.main-container {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
}

/* 左侧导航栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #001529 0%, #002140 100%);
    color: #fff;
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: fixed;
    left: calc(var(--sidebar-width) - 40px);
    top: 76px;
    z-index: 1001;
    backdrop-filter: blur(8px);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-toggle i {
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    margin: 2px 8px;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.2) 0%, rgba(24, 144, 255, 0.1) 100%);
    color: #fff;
    font-weight: 500;
}

.nav-item.active::before {
    height: 60%;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
}

.nav-group {
    margin-top: 8px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
}

.nav-group-title:hover {
    color: rgba(255, 255, 255, 0.75);
}

.nav-group-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-group-icon {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 17px;
}

.nav-group-arrow {
    font-size: 14px;
    transition: var(--transition);
}

.nav-group.is-collapsed .nav-group-arrow {
    transform: rotate(-90deg);
}

.nav-group.is-collapsed > .nav-item {
    display: none;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    /* padding: 32px; */
    background: transparent;
    min-height: calc(100vh - 64px);
    transition: var(--transition);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-toggle {
    width: 32px;
    left: calc(var(--sidebar-collapsed-width) - 40px);
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-nav {
    padding-top: 8px;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    gap: 0;
    padding: 12px 0;
    margin: 4px 10px;
}

body.sidebar-collapsed .nav-item:hover {
    transform: translateX(0);
}

body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .nav-group-title {
    width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

body.sidebar-collapsed .nav-group {
    margin-top: 10px;
}

body.sidebar-collapsed .nav-icon {
    font-size: 18px;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    padding: 0;
}

.page-content {
    display: none;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 25px;
    min-height: calc(100vh - 112px);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

body.sidebar-collapsed .page-content.active {
    border-radius: 0;
    box-shadow: none;
    padding: 28px 32px 32px;
    min-height: calc(100vh - 64px);
}

.page-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-secondary);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 2px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    margin: 0;
}

/* 警告横幅 */
.warning-banner {
    background: linear-gradient(135deg, #fffbe6 0%, #fff7e6 100%);
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ad6800;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.warning-banner i {
    font-size: 20px;
    color: var(--warning-color);
    flex-shrink: 0;
}

/* 文章编辑器容器 */
.article-editor-container {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* AI正文展示区域（改稿模式） */
.ai-content-display {
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff7e6 0%, #fffbea 100%);
    border-radius: var(--radius-md);
    border: 1px solid #ffe7ba;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ai-content-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ai-content-label i {
    color: var(--warning-color);
}

.ai-content-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    cursor: default;
}

/* 提示词选择区域 */
.prompt-selector-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.prompt-selector-header {
    margin-bottom: 4px;
}

.prompt-selector-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prompt-selector-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-selector-label i {
    color: var(--primary-color);
}

.prompt-selector {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
    cursor: pointer;
    height: 36px;
}

.prompt-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.prompt-selector:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 提示词按钮组 */
.prompt-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    align-items: center;
}

/* 提示词按钮（横向布局：图标左，文字右） */
.prompt-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    height: 36px;
    min-width: auto;
}

.prompt-btn i {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.prompt-btn span {
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.prompt-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.15);
}

.prompt-btn:hover:not(:disabled) i,
.prompt-btn:hover:not(:disabled) span {
    color: var(--primary-color);
}

/* 禁用状态 */
.prompt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
    border-color: var(--border-color);
    pointer-events: none;
}

.prompt-btn:disabled i,
.prompt-btn:disabled span {
    color: var(--text-tertiary);
}

/* AI工具列 */
.ai-tools-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.ai-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-height: 80px;
    justify-content: center;
}

/* 禁用状态样式 */
.ai-tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
    border-color: var(--border-color);
    pointer-events: none;
}

.ai-tool-btn:disabled:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.ai-tool-btn:disabled i {
    color: var(--text-tertiary);
}

.ai-tool-btn:disabled span {
    color: var(--text-tertiary);
}

.ai-tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
    transition: var(--transition);
}

.ai-tool-btn:hover {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-tool-btn:hover::before {
    left: 100%;
}

.ai-tool-btn i {
    font-size: 20px;
    margin-bottom: 2px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.ai-tool-btn:hover i {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* 编辑器主区域 */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    /* 防止flex子元素溢出 */
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* 图片上传区域 */
.image-upload-container {
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
}

.image-upload-area {
    position: relative;
    width: 150px;
    height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
}

.image-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
    padding: 10px;
    box-sizing: border-box;
}

.image-upload-placeholder:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.image-upload-placeholder i {
    font-size: 32px;
    margin-bottom: 8px;
}

.image-upload-placeholder span {
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    background: var(--bg-secondary);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.image-remove-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.image-remove-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-preview-link {
    margin-top: 8px;
    text-align: center;
}

.image-preview-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.image-preview-link a:hover {
    text-decoration: underline;
}

.article-title-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
    font-weight: 500;
}

.article-title-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.char-counter {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.editor-wrapper {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.editor-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.toolbar-btn i {
    font-size: 14px;
}

.toolbar-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: scale(1.05);
}

.toolbar-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #e8e8e8;
    margin: 0 4px;
}

.editor-content {
    min-height: 450px;
    padding: 20px;
    outline: none;
    font-size: 15px;
    line-height: 1.8;
    overflow-y: auto;
    background: var(--bg-primary);
}

.editor-content::-webkit-scrollbar {
    width: 8px;
}

.editor-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.editor-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.editor-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.editor-content:empty::before {
    content: attr(placeholder);
    color: #bfbfbf;
}

.editor-footer {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
    border-top: 1px solid var(--border-color);
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.editor-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* ====== 发图文/动态 - 图片上传区域 ====== */
.image-post-upload-section {
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.image-post-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.image-post-grid::-webkit-scrollbar {
    height: 6px;
}

.image-post-grid::-webkit-scrollbar-track {
    background: transparent;
}

.image-post-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.image-post-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.image-post-item {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.image-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-post-item .image-post-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: var(--transition);
}

.image-post-item:hover .image-post-remove {
    opacity: 1;
}

.image-post-item .image-post-remove:hover {
    background: var(--danger-color);
}

.image-post-add-btn {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-tertiary);
}

.image-post-add-btn i {
    font-size: 24px;
}

.image-post-add-btn span {
    font-size: 12px;
}

.image-post-add-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #e6f7ff;
}

.image-post-counter {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ====== 发视频 - 布局和样式 ====== */
.video-editor-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.video-editor-left {
    flex: 1;
    min-width: 0;
}

.video-editor-right {
    width: 320px;
    flex-shrink: 0;
}

.video-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}



/* 优化输入框背景 */
.article-title-input,
.editor-content {
    background: #f5f7fa !important;
    /* Light blue-grey background */
    border-color: transparent !important;
    transition: all 0.3s;
}

.article-title-input:hover,
.editor-content:hover {
    background: #ecf0f5 !important;
}

.article-title-input:focus,
.editor-content:focus {
    background: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 优化字数统计样式 */
.char-counter,
.editor-footer {
    background: transparent !important;
}

/* 优化选择框 */
.prompt-selector {
    height: 40px;
    background-color: #f5f7fa;
    border-color: #e8e8e8;
}

/* 视频上传区域 */
.video-post-upload-section {
    position: sticky;
    top: 20px;
}

.video-post-upload-section .prompt-selector-label {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-post-upload-area {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    min-height: 560px;
    /* Align with left column content */
    max-height: 600px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-post-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.video-post-upload-area #videoPostPreview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #000;
}

.video-post-upload-area #videoPostPreview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.video-post-upload-area #videoPostPlaceholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    width: 100%;
    height: 100%;
}

.video-post-upload-area #videoPostPlaceholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

.video-post-upload-area #videoPostPlaceholder span {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.video-upload-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.video-post-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.video-post-remove:hover {
    background: var(--danger-color);
}

/* 账号选择面板 */
.account-panel {
    width: 300px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-secondary);
}

.refresh-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    transition: var(--transition);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn i {
    font-size: 14px;
}

.refresh-btn:hover {
    transform: rotate(180deg);
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.account-list {
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.account-list::-webkit-scrollbar {
    width: 6px;
}

.account-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

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

.account-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.account-item:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

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

.account-item input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.account-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0.05) 100%);
}

.account-item.selected:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.1) 100%);
}

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d9d9d9 100%);
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: block;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 500;
}

.account-status {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(82, 196, 26, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.account-status.offline {
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

.btn-add-account {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-account i {
    font-size: 14px;
}

.btn-add-account:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-active) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-active) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: var(--bg-primary);
    transition: var(--transition);
    font-weight: 500;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-box {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 300px;
    margin-left: auto;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

/* 文章表格 */
.article-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
}

.article-table thead {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
}

.article-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-secondary);
    transition: var(--transition);
}


.article-table tbody tr {
    transition: var(--transition);
}

.article-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.03) 0%, transparent 100%);
    transform: scale(1.001);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.status-draft {
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

.status-published {
    color: var(--success-color);
    background: rgba(82, 196, 26, 0.1);
}

.status-scheduled {
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.1);
}

.status-pending {
    color: var(--warning-color);
    background: rgba(250, 173, 20, 0.1);
}

.status-active {
    color: var(--success-color);
    background: rgba(82, 196, 26, 0.1);
}

.status-suspended {
    color: var(--error-color);
    background: rgba(255, 77, 79, 0.1);
}

/* 角色徽章样式 */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.role-admin {
    color: #722ed1;
    background: rgba(114, 46, 209, 0.1);
}

.role-agent {
    color: #1890ff;
    background: rgba(24, 144, 255, 0.1);
}

.role-customer {
    color: var(--success-color);
    background: rgba(82, 196, 26, 0.1);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn i {
    font-size: 12px;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 2px solid var(--bg-secondary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    font-size: 18px;
    cursor: pointer;
    color: var(--text-tertiary);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close i {
    font-size: 18px;
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.article-preview-cover-wrap {
    margin-bottom: 20px;
    overflow: visible;
}

.article-preview-cover,
.article-preview-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 8px;
}

.article-preview-content img {
    margin: 16px 0;
}

/* 平台选择弹窗 */
.modal-platform-select {
    max-width: 600px;
}

.platform-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.platform-type-tab {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.platform-type-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.platform-type-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
    min-width: 80px;
}

.platform-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.platform-item.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.platform-item.is-loading {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    cursor: wait;
    pointer-events: none;
}

.platform-item.is-loading .platform-icon {
    position: relative;
}

.platform-item.is-loading .platform-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 3px solid rgba(31, 140, 255, 0.18);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: platformLoadingSpin 0.8s linear infinite;
}

.platform-loading-text {
    display: none;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.platform-item.is-loading .platform-loading-text {
    display: block;
}

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

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: var(--bg-secondary);
}

.platform-icon img {
    width: 100%;
    height: 100%;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.platform-baijiahao-icon {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
}

.platform-toutiao-icon {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.platform-wordpress-icon {
    background: linear-gradient(135deg, #21759b 0%, #1a5a7a 100%);
}

.platform-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.platform-section-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* 占位提示 */
.coming-soon {
    text-align: center;
    padding: 120px 0;
    color: var(--text-tertiary);
    font-size: 18px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-radius: var(--radius-lg);
    margin: 20px 0;
    border: 2px dashed var(--border-color);
}

.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* 账号管理页面样式 */
.account-action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.account-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: visible;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
}

.account-table thead {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
}

.account-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 14px;
    position: relative;
}

.sort-icon {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    cursor: pointer;
}

.account-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-secondary);
    transition: var(--transition);
}

.account-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.account-name-text {
    font-weight: 500;
    color: var(--text-primary);
}

.platform-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.platform-baijiahao {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.platform-toutiao {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.platform-wordpress {
    background: rgba(33, 117, 155, 0.1);
    color: #21759b;
}

.status-online {
    color: var(--success-color);
    background: rgba(82, 196, 26, 0.1);
}

.status-offline {
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

/* 账号操作按钮样式 */
.account-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

/* 更多菜单样式 */
.more-menu-container {
    position: relative;
    display: inline-block;
}

.more-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 120px;
    overflow: hidden;
}

.more-menu-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.more-menu-item:hover {
    background: var(--bg-secondary);
    color: #d32f2f;
}

.more-menu-item i {
    width: 16px;
    text-align: center;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 150px;
    z-index: 10000;
    margin-top: 4px;
    overflow: visible;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.dropdown-menu a i {
    font-size: 12px;
    width: 16px;
}

/* AI创作 */
.ai-creation-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ai-creation-page-header p {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 8px;
}

.ai-creation-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.ai-creation-create-btn {
    flex: 0 0 auto;
}

.save-status-hint {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 13px;
}

.ai-creation-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-primary);
}

.ai-creation-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ai-creation-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.ai-creation-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    vertical-align: middle;
}

.ai-creation-table tbody tr:hover td {
    background: #f6fbff;
}

.ai-creation-table tr:last-child td {
    border-bottom: none;
}

.ai-creation-cell-ellipsis {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-creation-cell-subline {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-creation-badge,
.ai-creation-more-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ai-creation-more-badge {
    margin-left: 6px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 11px;
}

.ai-creation-type-article { background: var(--primary-light); color: var(--primary-color); }
.ai-creation-type-image_text { background: #fff0f6; color: #eb2f96; }
.ai-creation-type-video { background: #fff7e6; color: #fa8c16; }
.ai-creation-status-pending { background: var(--warning-light); color: var(--warning-color); }
.ai-creation-status-done { background: var(--success-light); color: var(--success-color); }
.ai-creation-status-failed { background: #fff1f0; color: var(--error-color); }
.ai-creation-status-partial_failed { background: var(--warning-light); color: var(--warning-color); }

.ai-creation-actions {
    display: flex;
    gap: 6px;
}

.ai-creation-action {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 12px;
    cursor: pointer;
}

.ai-creation-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ai-creation-action.danger:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.ai-creation-detail-modal {
    max-width: 980px;
    width: 94%;
}

.ai-creation-detail-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.ai-creation-detail-summary span {
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.ai-creation-detail-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.ai-creation-detail-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}

.ai-creation-detail-table th,
.ai-creation-detail-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

.ai-creation-detail-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.ai-creation-error-cell {
    max-width: 320px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-creation-detail-compact-cell {
    max-width: 180px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-creation-result-cell {
    max-width: 260px;
    color: var(--text-secondary);
}

.ai-creation-result-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-creation-result-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-creation-copy-btn {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--primary-color);
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}

.ai-creation-copy-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.ai-creation-copy-btn:disabled {
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.ai-creation-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 12px;
}

.ai-creation-wizard-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(4px);
}

.ai-creation-wizard-overlay.open {
    display: flex;
}

.ai-creation-wizard {
    width: 720px;
    max-width: 94vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.ai-creation-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.ai-creation-wizard-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 700;
}

.ai-creation-wizard-title i {
    color: var(--primary-color);
}

.ai-creation-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
}

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

.ai-creation-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.ai-creation-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 74px;
    color: var(--text-tertiary);
    cursor: pointer;
}

.ai-creation-step span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    font-size: 13px;
    font-weight: 700;
}

.ai-creation-step small {
    font-size: 12px;
}

.ai-creation-step.active span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.14);
}

.ai-creation-step.active small {
    color: var(--primary-color);
    font-weight: 600;
}

.ai-creation-step.done span {
    background: var(--success-color);
    border-color: var(--success-color);
    color: #fff;
}

.ai-creation-step.done small {
    color: var(--success-color);
}

.ai-creation-step-line {
    flex: 1;
    height: 2px;
    min-width: 16px;
    margin-bottom: 19px;
    background: var(--border-color);
}

.ai-creation-step-line.done {
    background: var(--success-color);
}

.ai-creation-wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

.ai-creation-panel {
    display: none;
}

.ai-creation-panel.active {
    display: block;
}

.ai-creation-hint {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 18px;
}

.ai-creation-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ai-creation-type-card,
.ai-creation-select-card {
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.ai-creation-type-card {
    min-height: 150px;
    padding: 22px 16px;
    text-align: center;
}

.ai-creation-type-card:hover,
.ai-creation-select-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.ai-creation-type-card.active,
.ai-creation-select-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.10);
}

.ai-creation-type-card i {
    display: block;
    margin-bottom: 10px;
    color: var(--text-tertiary);
    font-size: 28px;
}

.ai-creation-type-card.active i {
    color: var(--primary-color);
}

.ai-creation-type-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 15px;
}

.ai-creation-type-card span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.5;
}

.ai-creation-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.ai-creation-select-card {
    position: relative;
    min-height: 126px;
    padding: 14px;
    text-align: left;
}

.ai-creation-select-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.ai-creation-select-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e8f4fd;
    color: var(--primary-color);
}

.ai-creation-select-count,
.ai-creation-select-type {
    padding: 2px 7px;
    border-radius: 8px;
    background: #f0f0f0;
    color: var(--text-tertiary);
    font-size: 11px;
    white-space: nowrap;
}

.ai-creation-select-title {
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.ai-creation-select-desc {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-creation-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
}

.ai-creation-select-card.selected .ai-creation-check {
    display: flex;
}

.ai-creation-form-hint {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 13px;
}

.ai-creation-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
}

.ai-creation-tab {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}

.ai-creation-tab:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.ai-creation-tab:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.ai-creation-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.ai-creation-keyword-picker {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
}

.ai-creation-picker-column {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-primary);
}

.ai-creation-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.ai-creation-picker-header button {
    border: none;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
}

.ai-creation-picker-list {
    height: 260px;
    overflow-y: auto;
    padding: 8px;
}

.ai-creation-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.ai-creation-picker-item:hover,
.ai-creation-picker-item.active,
.ai-creation-picker-item.selected {
    background: var(--primary-light);
    color: var(--primary-color);
}

.ai-creation-picker-item input {
    flex: 0 0 auto;
}

.ai-creation-wizard-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.ai-creation-wizard-footer span {
    flex: 1;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

@media (max-width: 900px) {
    .ai-creation-page-header,
    .ai-creation-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-creation-create-btn {
        justify-content: center;
    }

    .ai-creation-type-grid,
    .ai-creation-keyword-picker {
        grid-template-columns: 1fr;
    }

    .ai-creation-table {
        min-width: 900px;
    }

    .ai-creation-table-wrap {
        overflow-x: auto;
    }
}

/* 词库管理 */
.keyword-management-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.keyword-groups,
.keyword-main {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.keyword-groups {
    overflow: visible;
    min-height: 600px;
}

.keyword-main {
    min-height: 600px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-secondary);
}

.panel-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow: visible;
}

/* 翻页控件 */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0 0;
    margin-top: 16px;
    border-top: 2px solid var(--bg-secondary);
}

.btn-page {
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-page:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.btn-page i {
    font-size: 12px;
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 8px;
}

.page-info span {
    color: var(--primary-color);
    font-weight: 600;
}

.group-item {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

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

.group-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    box-shadow: var(--shadow-sm);
}

.group-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 知识库类型图标 */
.kb-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}

.kb-type-icon.type-document {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.kb-type-icon.type-image {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.kb-type-icon.type-video {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.kb-brand-tag {
    font-size: 11px;
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.08);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
    white-space: nowrap;
}

/* 知识库内容列表项 */
.content-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.content-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.content-title {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.content-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.content-actions .btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-actions .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.content-actions .btn-icon:hover i.fa-trash {
    color: var(--error-color);
}

/* 输入框带计数器 */
.input-with-counter {
    position: relative;
}

.input-with-counter .modal-input {
    padding-right: 60px;
}

.input-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
}

.group-count {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.group-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* 下拉菜单容器 */
.dropdown-menu-container {
    position: relative;
    display: inline-block;
}

/* 更多按钮（三个点） */
.btn-more {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.btn-more:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.btn-more.active {
    background: var(--primary-color);
    color: #fff;
}

.group-item.active .btn-more:hover {
    background: rgba(24, 144, 255, 0.15);
}

.group-item.active .btn-more.active {
    background: var(--primary-color);
    color: #fff;
}

/* 下拉菜单弹出层 */
.dropdown-menu-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 160px;
    overflow: visible;
    display: none;
}

.dropdown-menu-popup.active,
.dropdown-menu-popup.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 下拉菜单项 */
.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.dropdown-menu-item:hover {
    background: var(--bg-secondary);
}

.dropdown-menu-item.danger {
    color: var(--error-color);
}

.dropdown-menu-item.danger i {
    color: var(--error-color);
}

.dropdown-menu-item.danger:hover {
    background: rgba(255, 77, 79, 0.08);
}

.keyword-main .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.panel-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

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

.title-sub {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.title-sub strong {
    color: var(--primary-color);
    font-weight: 700;
}

.keyword-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
}

.search-box.compact {
    max-width: 260px;
    margin-left: 0;
    flex: 1;
}

.search-box.compact input {
    padding: 8px 14px;
    font-size: 13px;
}

.inline-add {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.inline-add input {
    min-width: 200px;
    padding: 8px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    font-size: 13px;
}

.inline-add input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.keyword-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.keyword-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.keyword-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(2px);
}

.keyword-item .kw {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    flex: 0 1 auto;
    font-size: 14px;
    min-width: 0;
    margin-right: 12px;
}

/* 关键词列表批量管理 */
.keyword-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    gap: 16px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.batch-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.selected-count {
    color: var(--text-tertiary);
    font-size: 12px;
    margin-left: 8px;
}

.keyword-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-warning {
    background: #faad14;
    color: #fff;
    border: none;
}

.btn-warning:hover {
    background: #d48806;
}


.meta-dot {
    color: var(--text-tertiary);
    margin: 0 6px;
}

.meta-ghost {
    color: var(--text-tertiary);
}

.btn.ghost {
    border-style: dashed;
    color: var(--text-secondary);
    background: transparent;
}

.btn.ghost:hover {
    background: var(--bg-secondary);
    border-style: solid;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #cf1322 0%, #ff4d4f 100%);
    box-shadow: var(--shadow-md);
}

.modal-sm {
    max-width: 420px;
}

.modal-md {
    max-width: 640px;
}

.modal-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-input,
.modal-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-primary);
    transition: var(--transition);
    outline: none;
}

.modal-textarea {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    background: var(--bg-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
}

.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
    outline: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 2px solid var(--bg-secondary);
    background: var(--bg-secondary);
}

/* 发布账号确认弹窗 */
.modal-publish-account {
    max-width: 700px;
}

.publish-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 4px solid #faad14;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    color: #614700;
    font-size: 14px;
    line-height: 1.6;
}

.publish-warning-banner i {
    color: #faad14;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.publish-account-section {
    margin-top: 20px;
}

.publish-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.publish-account-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-icon i {
    font-size: 14px;
}

.publish-account-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.publish-account-list::-webkit-scrollbar {
    width: 6px;
}

.publish-account-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.publish-account-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.publish-account-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* 发布账号列表中的账号项样式 */
.publish-account-list .account-item {
    margin-bottom: 12px;
    background: var(--bg-primary);
}

.publish-account-list .account-item:last-child {
    margin-bottom: 0;
}

/* 平台徽章样式（用于发布账号列表中的头像徽章） */
.publish-account-list .platform-badge,
.account-avatar-wrapper .platform-badge {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

.publish-account-list .platform-badge.baijiahao,
.account-avatar-wrapper .platform-badge.baijiahao {
    background: #1890ff;
}

.publish-account-list .platform-badge.toutiao,
.account-avatar-wrapper .platform-badge.toutiao {
    background: #ff4d4f;
}

.account-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* 定时发布时间选择器弹窗 */
.modal-schedule-time {
    max-width: 500px;
}

.schedule-time-instruction {
    margin-bottom: 24px;
    text-align: center;
}

.schedule-time-instruction p {
    margin: 8px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.schedule-time-instruction p:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-time-example {
    color: var(--text-tertiary) !important;
    font-size: 13px !important;
}

.schedule-time-input-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px 0;
}

.schedule-time-input {
    width: 100%;
    max-width: 420px;
    padding: 16px 20px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.schedule-time-input:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.schedule-time-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

/* 自定义 datetime-local 输入框样式（针对不同浏览器） */
.schedule-time-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.schedule-time-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.schedule-time-input::-webkit-datetime-edit-text {
    color: var(--text-secondary);
    padding: 0 4px;
}

.schedule-time-input::-webkit-datetime-edit-month-field,
.schedule-time-input::-webkit-datetime-edit-day-field,
.schedule-time-input::-webkit-datetime-edit-year-field,
.schedule-time-input::-webkit-datetime-edit-hour-field,
.schedule-time-input::-webkit-datetime-edit-minute-field {
    color: var(--text-primary);
    padding: 0 2px;
}

.schedule-time-input::-webkit-datetime-edit-month-field:focus,
.schedule-time-input::-webkit-datetime-edit-day-field:focus,
.schedule-time-input::-webkit-datetime-edit-year-field:focus,
.schedule-time-input::-webkit-datetime-edit-hour-field:focus,
.schedule-time-input::-webkit-datetime-edit-minute-field:focus {
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
    border-radius: 3px;
    outline: none;
}

.input-ghost {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    min-width: 180px;
    transition: var(--transition);
    font-size: 13px;
    outline: none;
}

.input-ghost:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.keyword-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    border: 2px solid rgba(24, 144, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.summary-card.muted {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
    border-color: var(--border-color);
}

.summary-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.summary-value.small {
    font-size: 18px;
    font-weight: 600;
}

.summary-extra {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.helper-row {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
}

.keyword-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 0;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}

.keyword-pagination-info {
    font-size: 12px;
    color: var(--text-tertiary);
}

.keyword-pagination-info strong {
    color: var(--text-secondary);
}

.keyword-pagination-buttons {
    display: flex;
    gap: 8px;
}

.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
}

.error {
    text-align: center;
    padding: 40px 20px;
    color: var(--error-color);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .article-editor-container {
        flex-direction: column;
    }

    .prompt-selector-row {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-selector {
        max-width: 100%;
        width: 100%;
    }

    .prompt-buttons-group {
        width: 100%;
        justify-content: flex-start;
    }

    .prompt-btn {
        flex: 0 0 auto;
    }

    .ai-tools-column {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .editor-main {
        max-width: 100%;
    }

    .keyword-management-container {
        grid-template-columns: 1fr;
    }

    .keyword-toolbar {
        justify-content: flex-start;
    }
}

@media (max-width: 1200px) {
    .profile-summary-grid,
    .profile-security-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-hero,
    .profile-hero-main,
    .profile-tabs,
    .profile-security-item {
        flex-direction: column;
    }

    .profile-hero,
    .profile-panels,
    .profile-section-card {
        padding: 18px;
    }

    .profile-hero-actions,
    .profile-form-actions {
        width: 100%;
    }

    .profile-hero-actions .btn,
    .profile-form-actions .btn,
    .profile-security-item .btn {
        width: 100%;
    }

    .profile-info-grid,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-section-head {
        flex-direction: column;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* 选择文本样式 */
::selection {
    background: rgba(24, 144, 255, 0.2);
    color: var(--text-primary);
}

/* 输入框占位符样式 */
::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* 焦点可见性 */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 加载动画 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 提示词管理页面样式 */
.prompt-management-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.prompt-action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: space-between;
}

.prompt-list-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.prompt-table {
    width: 100%;
    border-collapse: collapse;
}

.prompt-table thead {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
}

.prompt-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-secondary);
    transition: var(--transition);
}

.prompt-table tbody tr {
    transition: var(--transition);
}

.prompt-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.03) 0%, transparent 100%);
    transform: scale(1.001);
}

/* 系统设置页面样式 */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1000px;
}

.settings-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-section-highlight {
    border-color: rgba(24, 144, 255, 0.35);
    box-shadow: 0 10px 24px rgba(24, 144, 255, 0.12);
}

.settings-section-highlight .settings-section-header {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.04) 100%);
}

.settings-section-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f0f0 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section-header h3 i {
    color: var(--primary-color);
}

.settings-content {
    padding: 20px;
}

.setting-item {
    margin-bottom: 24px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.setting-control {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 6px;
}

.setting-input {
    flex: 1;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
}

.setting-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.setting-value {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: inline-block;
    min-width: 200px;
}

.setting-help {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    line-height: 1.5;
}

.setting-help a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.setting-help a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.setting-link-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setting-link-group .btn {
    text-decoration: none;
}

.settings-section-highlight .setting-link-group .btn {
    min-width: 220px;
}

.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-setting-card {
    margin-bottom: 0;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-primary) 0%, #fcfdff 100%);
}

.profile-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(24, 144, 255, 0.18), transparent 32%),
        linear-gradient(135deg, #f8fbff 0%, #eef6ff 52%, #ffffff 100%);
    border: 1px solid rgba(24, 144, 255, 0.16);
    box-shadow: 0 16px 40px rgba(15, 76, 129, 0.08);
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #1677ff 0%, #59a9ff 100%);
    box-shadow: 0 10px 24px rgba(22, 119, 255, 0.24);
}

.profile-avatar-edit {
    border: none;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.profile-avatar-edit:hover {
    background: #fff;
    color: var(--primary-color);
}

.profile-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-hero-title-row h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #17324d;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(82, 196, 26, 0.12);
    color: #389e0d;
    font-size: 12px;
    font-weight: 600;
}

.profile-hero-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.profile-hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(24, 144, 255, 0.12);
    color: #35516f;
    font-size: 13px;
}

.profile-hero-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.profile-summary-grid-compact .profile-summary-card {
    padding: 20px;
}

.profile-summary-card {
    padding: 22px 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    box-shadow: var(--shadow-sm);
}

.profile-summary-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.profile-summary-value {
    color: #17324d;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-summary-hint {
    color: var(--text-tertiary);
    font-size: 12px;
}

.profile-workspace {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-tabs {
    display: flex;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(24, 144, 255, 0.04) 0%, rgba(24, 144, 255, 0.01) 100%);
}

.profile-tab {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-tab:hover {
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.08);
}

.profile-tab.active {
    color: var(--primary-color);
    background: #fff;
    border-color: rgba(24, 144, 255, 0.18);
    box-shadow: 0 8px 20px rgba(24, 144, 255, 0.1);
}

.profile-panels {
    padding: 24px;
}

.profile-panel {
    display: none;
}

.profile-panel.active {
    display: block;
}

.profile-section-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.profile-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.profile-section-head h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #17324d;
}

.profile-section-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-section-tip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f9ff;
    color: #4b6b88;
    font-size: 12px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%);
    border: 1px solid #edf2f7;
}

.profile-info-label,
.profile-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.profile-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #17324d;
    word-break: break-all;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-form-item-full {
    grid-column: 1 / -1;
}

.profile-textarea {
    min-height: 120px;
    resize: vertical;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.profile-security-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.profile-security-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%);
    border: 1px solid #edf2f7;
}

.profile-security-title {
    font-size: 15px;
    font-weight: 600;
    color: #17324d;
    margin-bottom: 6px;
}

.profile-security-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-security-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.profile-security-tag.muted {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

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

.btn-warning {
    background-color: var(--warning-color);
    color: white;
    border: none;
}

.btn-warning:hover {
    background-color: #d48806;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #cf1322;
}

/* 扣子配置样式 */
.couzi-config-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.couzi-config-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.couzi-config-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.couzi-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.couzi-config-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.couzi-config-title i {
    color: var(--primary-color);
}

.couzi-config-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-action:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.couzi-config-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.couzi-config-field {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.field-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.field-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 文章详情弹窗样式 */
.article-detail-info {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: var(--primary-color);
}

.detail-content {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.markdown-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    white-space: normal;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 16px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.markdown-content h3 {
    font-size: 1.25em;
}

.markdown-content p {
    margin-top: 0;
    margin-bottom: 10px;
}

.markdown-content ul,
.markdown-content ol {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 2em;
}

.markdown-content li {
    margin-bottom: 8px;
}

.markdown-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-content pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 6px;
    margin-bottom: 16px;
}

.markdown-content pre code {
    display: inline;
    max-width: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;
}

.markdown-content blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin-bottom: 16px;
}

.markdown-content table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
}

.markdown-content table th,
.markdown-content table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-content table th {
    font-weight: 600;
    background-color: #f6f8fa;
}

.markdown-content table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

.markdown-content a {
    color: #0366d6;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 16px 0;
}

.markdown-content hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

/* 参考资料样式 */
.geo-collection-one-line {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geo-collection-one-line.is-clickable {
    color: var(--primary-color);
    cursor: pointer;
}

.geo-brand-hit {
    padding: 0 2px;
    border-radius: 2px;
    background: #fff1b8;
    color: #ad6800;
}

.geo-collection-status {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.geo-collection-status.yes {
    background: #f6ffed;
    color: #389e0d;
}

.geo-collection-status.no {
    background: #f5f5f5;
    color: #8c8c8c;
}

.geo-citation-count-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
}

.geo-collection-detail-modal,
.geo-result-citations-modal,
.geo-citation-content-modal {
    width: min(900px, 95vw);
    max-height: 88vh;
    overflow-y: auto;
}

.geo-collection-detail-meta,
.geo-result-citation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.geo-collection-detail-text {
    margin: 8px 0 20px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    overflow-wrap: anywhere;
    line-height: 1.75;
}

.geo-result-citations-list { display: grid; }
.geo-result-citation-row { padding: 14px 2px 16px; border-bottom: 1px solid #f0f1f3; }
.geo-result-citation-row:first-child { padding-top: 2px; }
.geo-result-citation-row:last-child { border-bottom: 0; }
.geo-result-citation-content { min-width: 0; flex: 1; }
.geo-result-citation-source-line { display: flex; align-items: center; gap: 8px; min-height: 24px; color: #727b87; font-size: 12px; }
.geo-result-source-icon { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 5px; background: #eef1f5; color: #8b95a1; font-size: 10px; font-weight: 700; }
.geo-result-source-icon.official { background: #ff4d4f; color: #fff; }
.geo-result-source-name { color: #1f2937; font-weight: 700; }
.geo-result-source-domain { padding: 2px 7px; border-radius: 999px; background: #f3f6fb; color: #4b5563; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12px; }
.geo-result-source-badge { padding: 2px 7px; border-radius: 999px; background: #f5f5f5; color: #7a818c; font-size: 12px; }
.geo-result-source-divider, .geo-result-source-date { color: #a1a8b0; }
.geo-result-citation-index { display: inline-grid; width: 18px; height: 18px; margin-left: auto; place-items: center; border-radius: 50%; background: #f0f2f5; color: #7d8792; font-size: 10px; }
.geo-result-citation-title-link { display: block; margin: 0 0 8px; overflow: hidden; color: #111827; font-size: 15px; font-weight: 700; line-height: 1.45; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.geo-result-citation-title-link:hover { color: #1677ff; }
.geo-result-citation-title-link.disabled { color: #111827; }
.geo-result-citation-description { display: -webkit-box; margin: 0; overflow: hidden; color: #78818c; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.geo-citation-content-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.geo-citation-content-action { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 0; border-radius: 6px; font-size: 12px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.geo-citation-content-action.compact { margin-left: 4px; padding: 3px 7px; }
.geo-citation-content-action.success { background: #e6f4ff; color: #1677ff; }
.geo-citation-content-action.pending { background: #f5f5f5; color: #737373; }
.geo-citation-content-action.waiting { background: #fff7e6; color: #d46b08; }
.geo-citation-content-action.failed { background: #fff1f0; color: #cf1322; }
.geo-citation-content-action.unsupported { background: #f5f5f5; color: #8c8c8c; cursor: default; }
.geo-citation-content-detail h2 { margin: 0 0 10px; color: #1f2937; font-size: 22px; line-height: 1.5; }
.geo-citation-content-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 20px; color: #8c8c8c; font-size: 13px; }
.geo-citation-content-meta a { color: #1677ff; text-decoration: none; }
.geo-citation-content-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 20px; }
.geo-citation-content-image { margin: 0; overflow: hidden; border: 1px solid #edf0f3; border-radius: 8px; background: #fafafa; }
.geo-citation-content-image img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.geo-citation-content-image figcaption { padding: 6px 9px; color: #737373; font-size: 12px; }
.geo-citation-content-text { padding: 18px; border: 1px solid #edf0f3; border-radius: 8px; background: #fafbfc; color: #262626; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.geo-citation-content-state { padding: 40px 20px; text-align: center; color: #737373; }
.geo-citation-content-state > i { display: block; margin-bottom: 12px; font-size: 30px; color: #8c8c8c; }
.geo-citation-content-state strong { display: block; color: #262626; font-size: 16px; }
.geo-citation-content-state p { margin: 10px auto 18px; max-width: 620px; color: #8c8c8c; }
.geo-citation-content-state.failed > i { color: #cf1322; }
.reference-count {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-tertiary);
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.reference-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.reference-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.reference-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.reference-content {
    flex: 1;
    min-width: 0;
}

.reference-title {
    margin-bottom: 6px;
}

.reference-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.reference-title a:hover {
    text-decoration: underline;
}

.reference-title .no-title {
    color: var(--text-tertiary);
    font-style: italic;
}

.reference-url {
    margin-bottom: 4px;
    font-size: 12px;
}

.reference-url a {
    color: var(--text-secondary);
    text-decoration: none;
    word-break: break-all;
}

.reference-url a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.reference-site {
    font-size: 12px;
    color: var(--text-tertiary);
}

.references-collapse {
    margin-top: 12px;
    text-align: center;
}

.references-hidden {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 提示词模态框折叠区域样式 */
.prompt-section {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-primary);
    transition: var(--transition);
}

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

.prompt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-secondary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.prompt-section-header:hover {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.05) 0%, var(--bg-secondary) 100%);
}

.prompt-section-header.active {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.1) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.prompt-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.prompt-section-title i {
    color: var(--primary-color);
    width: 18px;
    text-align: center;
}

.prompt-section-icon {
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
    font-size: 12px;
}

.prompt-section-header.active .prompt-section-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.prompt-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

.prompt-section-body.active {
    max-height: 500px;
    padding: 16px;
}

.prompt-section-body textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

/* ================== 定时任务样式 ================== */

.modal-create-task .modal-body {
    padding: 24px;
}

.task-form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.task-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary-color);
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label-small {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.required {
    color: var(--error-color);
}

.time-selector-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-item:hover {
    background: var(--bg-tertiary);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

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

.item-count {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.weekday-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.weekday-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.weekday-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(24, 144, 255, 0.05);
}

.weekday-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

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

.estimate-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.estimate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.estimate-card {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.estimate-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.estimate-icon i {
    font-size: 16px;
    color: var(--primary-color);
}

.estimate-content {
    width: 100%;
}

.estimate-content .estimate-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-weight: 400;
    line-height: 1.3;
}

.estimate-content .estimate-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 2px;
}

.estimate-content .estimate-unit {
    font-size: 11px;
    color: var(--text-secondary);
}

.estimate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.estimate-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.btn-outline {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.05);
}

/* 关键词来源选项卡 */
.keyword-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}
.keyword-tab:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.keyword-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.platform-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* 知识库管理页面样式 */
.knowledge-base-management-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.knowledge-base-groups,
.knowledge-base-main {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.knowledge-base-groups {
    overflow: visible;
    min-height: 600px;
}

.knowledge-base-main {
    min-height: 600px;
}

.knowledge-base-groups .group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow: visible;
}

.knowledge-base-group-item {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.knowledge-base-group-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.knowledge-base-group-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    box-shadow: var(--shadow-sm);
}

.knowledge-base-group-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.knowledge-base-group-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    flex: 1;
    min-width: 0;
}

.knowledge-base-group-type {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.knowledge-base-group-type.image {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.knowledge-base-main .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.knowledge-base-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
}

.knowledge-base-toolbar .btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.knowledge-base-toolbar .btn.btn-sm {
    height: 36px;
    font-size: 13px;
}

.knowledge-base-toolbar .search-box.compact {
    height: 36px;
}

.knowledge-base-toolbar .search-box.compact input {
    height: 36px;
}

.knowledge-base-toolbar .search-box.compact .search-btn {
    height: 36px;
    width: 36px;
}

.knowledge-base-content-list {
    margin-top: 16px;
    flex: 1;
    overflow-y: auto;
}

/* 知识库内容表格 */
.kb-content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.kb-content-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.kb-content-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.kb-content-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.kb-content-table tbody tr:hover {
    background: var(--bg-secondary);
}

.kb-content-table .col-title {
    min-width: 200px;
    max-width: 300px;
}

.kb-content-table .col-summary {
    min-width: 200px;
    max-width: 400px;
}

.kb-content-table .col-type {
    width: 80px;
    text-align: center;
}

.kb-content-table .col-time {
    width: 160px;
    white-space: nowrap;
}

.kb-content-table .col-actions {
    width: 100px;
    text-align: center;
}

.kb-content-table .content-title-cell {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-content-table .content-summary-cell {
    color: var(--text-secondary);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.kb-content-table .content-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 4px;
    font-size: 12px;
}

.kb-content-table .content-time-cell {
    color: var(--text-secondary);
    font-size: 13px;
}

.kb-content-table .action-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.kb-content-table .action-btns .btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-content-table .action-btns .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.kb-content-table .action-btns .btn-icon.btn-delete:hover {
    color: var(--error-color);
}

.knowledge-base-content-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.knowledge-base-content-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(2px);
}

.knowledge-base-content-info {
    flex: 1;
    min-width: 0;
}

.knowledge-base-content-title {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    font-size: 14px;
    margin-bottom: 4px;
}

.knowledge-base-content-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.knowledge-base-content-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 知识库类型选择器样式 */
.knowledge-base-type-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.type-option {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
}

.type-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.type-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, rgba(24, 144, 255, 0.02) 100%);
}

.type-option-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.type-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.type-option.selected .type-icon {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.2) 0%, rgba(24, 144, 255, 0.1) 100%);
}

.type-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.kb-project-bind-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 220px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.kb-project-bind-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-project-bind-agent {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.kb-project-bind-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    cursor: pointer;
}

.kb-project-bind-item span {
    font-size: 14px;
    color: var(--text-primary);
}

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

.type-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

.type-radio {
    flex-shrink: 0;
}

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

/* 浮窗提示（Toast）样式 */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 280px;
    max-width: 400px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-left: 4px solid var(--primary-color);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.toast-notification.toast-success {
    border-left-color: var(--success-color);
}

.toast-notification.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-notification.toast-error {
    border-left-color: var(--error-color);
}

.toast-notification.toast-error .toast-icon {
    color: var(--error-color);
}

.toast-notification.toast-warning {
    border-left-color: var(--warning-color);
}

.toast-notification.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-notification.toast-info {
    border-left-color: var(--primary-color);
}

.toast-notification.toast-info .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

/* ================== 图片知识库样式 ================== */

/* 图片知识库内容表格 */
.kb-image-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.kb-image-table th,
.kb-image-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.kb-image-table th {
    background: var(--bg-secondary);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.kb-image-table tbody tr:hover {
    background: var(--bg-secondary);
}

.kb-image-table .thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.3s;
}

.kb-image-table .thumbnail:hover {
    transform: scale(1.1);
}

.kb-image-table .filename-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-image-table .tags-cell {
    min-width: 100px;
    max-width: 180px;
}

.kb-image-table .tags-cell .tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px 2px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xs);
    font-size: 11px;
    color: var(--text-secondary);
}

.kb-image-table .tags-cell .more-tag {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.kb-image-table .tags-cell .no-data,
.kb-image-table .desc-cell .no-data {
    color: var(--text-tertiary);
}

.kb-image-table .desc-cell {
    min-width: 150px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图片状态标签 */
.kb-status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 500;
}

.kb-status-tag.pending {
    background: #fff7e6;
    color: #fa8c16;
}

.kb-status-tag.analyzing {
    background: #e6f7ff;
    color: #1890ff;
}

.kb-status-tag.completed {
    background: #f6ffed;
    color: #52c41a;
}

.kb-status-tag.failed {
    background: #fff2f0;
    color: #ff4d4f;
}

/* 上传区域样式 */
.kb-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    min-height: 200px;
    transition: var(--transition);
    overflow: hidden;
}

.kb-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(24, 144, 255, 0.05);
}

.kb-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    cursor: pointer;
    min-height: 200px;
    text-align: center;
}

.kb-upload-placeholder:hover {
    background: var(--bg-secondary);
}

.kb-upload-placeholder p {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.kb-upload-hint {
    color: var(--text-tertiary) !important;
    font-size: 12px !important;
}

/* 图片预览容器 */
.kb-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.kb-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.kb-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-preview-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.kb-preview-delete:hover {
    background: var(--error-color);
}

.kb-preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 上传进度条 */
.kb-upload-progress {
    padding: 0 20px 12px;
}

.kb-upload-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.kb-upload-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary, #e8e8e8);
    border-radius: 3px;
    overflow: hidden;
}

.kb-upload-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.kb-upload-progress-fill.indeterminate {
    width: 100% !important;
    background: linear-gradient(
        90deg,
        var(--primary-color) 25%,
        rgba(255, 255, 255, 0.3) 50%,
        var(--primary-color) 75%
    );
    background-size: 200% 100%;
    animation: kb-progress-stripe 1.5s linear infinite;
}

@keyframes kb-progress-stripe {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.kb-preview-add {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
}

.kb-preview-add:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.kb-preview-add span:first-child {
    font-size: 24px;
    line-height: 1;
}

.kb-preview-add span:last-child {
    font-size: 12px;
    margin-top: 4px;
}

/* 编辑图片预览 */
.kb-edit-image-preview {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.kb-edit-image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* 大图预览 */
.kb-preview-large-img {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

/* 大图预览关闭按钮 */
.kb-preview-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.kb-preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.kb-preview-close-btn:active {
    transform: scale(0.95);
}

/* ===== 图文预览 - 图片灯箱查看器 ===== */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    z-index: 1;
    cursor: default;
    transition: opacity 0.2s ease;
    user-select: none;
}

.lightbox-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.lightbox-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    user-select: none;
}

/* 图文预览中的可点击图片 */
.preview-clickable-img {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preview-clickable-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 分析按钮加载状态 */
.kb-action-btn.analyzing {
    border-color: var(--primary-color);
    color: var(--primary-color);
    cursor: not-allowed;
    opacity: 0.8;
}

/* 旋转动画 */
@keyframes kb-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.kb-spin {
    animation: kb-spin 1s linear infinite;
}

/* Tooltip 样式 */
.kb-tooltip-cell {
    position: relative;
    cursor: default;
}

.kb-tooltip-content {
    position: fixed;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    white-space: pre-wrap;
    max-width: 400px;
    min-width: 180px;
    word-break: break-word;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    line-height: 1.6;
}

.kb-tooltip-cell:hover .kb-tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* 图片表格操作按钮 */
.kb-image-table .action-btns {
    display: flex;
    gap: 6px;
}

.kb-image-table .btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
}

.kb-image-table .btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.kb-image-table .btn-icon.btn-danger:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.kb-image-table .btn-icon.btn-analyzing {
    border-color: var(--primary-color);
    color: var(--primary-color);
    cursor: not-allowed;
}

/* 视频占位缩略图 */
.kb-video-thumb {
    width: 60px;
    height: 60px;
    background: #1a1a2e;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, background 0.2s;
}

.kb-video-thumb:hover {
    transform: scale(1.1);
    background: #16213e;
}

.kb-video-thumb i {
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
}

/* 视频上传预览占位 */
.kb-preview-item-video .kb-video-preview-thumb {
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.kb-preview-item-video .kb-video-preview-thumb i {
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

/* 图片知识库工具栏 */
.kb-image-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.kb-image-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 提示词模板类型标签 */
.template-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.template-type-badge i {
    font-size: 11px;
}

.template-type-article {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.template-type-image_text {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.template-type-video {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

/* ========== 工作台 Dashboard ========== */

/* 快速上手流程引导卡片 */
.guide-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #eee);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color, #eee);
}

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

.guide-card-title i {
    color: var(--primary-color, #1890ff);
    margin-right: 6px;
}

.guide-card-close {
    background: none;
    border: none;
    color: var(--text-tertiary, #8c8c8c);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.guide-card-close:hover {
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-secondary, #595959);
}

.guide-card-steps {
    display: flex;
    align-items: stretch;
    padding: 20px 16px;
    gap: 0;
}

.guide-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.guide-step:hover {
    background: var(--bg-tertiary, #f5f5f5);
}

.guide-step:hover .guide-step-action {
    color: var(--primary-color, #1890ff);
}

.guide-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e8f4fd;
    color: var(--primary-color, #1890ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.guide-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #262626);
    margin-bottom: 6px;
}

.guide-step-desc {
    font-size: 12px;
    color: var(--text-tertiary, #8c8c8c);
    line-height: 1.5;
    margin-bottom: 10px;
}

.guide-step-action {
    font-size: 12px;
    color: var(--text-tertiary, #8c8c8c);
    font-weight: 500;
    transition: color 0.2s;
}

.guide-step-action i {
    font-size: 10px;
    margin-left: 2px;
}

.guide-plugin-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.guide-step:hover .guide-plugin-link {
    color: var(--primary-color, #1890ff);
    text-decoration: underline;
}

.guide-step-arrow {
    display: flex;
    align-items: center;
    color: var(--border-color, #ddd);
    font-size: 14px;
    padding: 0 2px;
    flex-shrink: 0;
}

/* 响应式：小屏幕流程卡片 */
@media (max-width: 1100px) {
    .guide-card-steps {
        flex-wrap: wrap;
        gap: 8px;
    }
    .guide-step {
        flex: 0 0 calc(33.33% - 16px);
    }
    .guide-step-arrow {
        display: none;
    }
}

@media (max-width: 600px) {
    .guide-card-steps {
        flex-direction: column;
        gap: 4px;
    }
    .guide-step {
        flex: 1;
        flex-direction: row;
        text-align: left;
        gap: 12px;
        padding: 12px;
    }
    .guide-step-num {
        position: absolute;
        top: 8px;
        left: 8px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .guide-step-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .guide-step-desc {
        margin-bottom: 0;
    }
    .guide-step-action {
        display: none;
    }
    .guide-step-arrow {
        display: none;
    }
}

.dashboard-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #eee);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-body {
    min-width: 0;
}

.stat-card-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary, #222);
    line-height: 1.2;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin: 2px 0;
}

.stat-card-sub {
    font-size: 11px;
    color: var(--text-muted, #999);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 中部行：趋势图 + 任务状态 */
.dashboard-middle-row {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-bottom: 20px;
}

/* 底部行：发布记录 + 快捷操作 */
.dashboard-bottom-row {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
}

/* 通用卡片 */
.dashboard-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #eee);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, #eee);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.dashboard-card-title i {
    margin-right: 6px;
    color: var(--primary-color, #4a90d9);
}

.dashboard-card-more {
    font-size: 12px;
    color: var(--primary-color, #4a90d9);
    text-decoration: none;
}

.dashboard-card-more:hover {
    text-decoration: underline;
}

.dashboard-card-body {
    padding: 16px 18px;
    flex: 1;
    position: relative;
}

/* 趋势图 Tab 切换 */
.dashboard-trend-tabs {
    display: flex;
    gap: 4px;
}

.trend-tab {
    padding: 3px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: transparent;
    font-size: 12px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: all 0.2s;
}

.trend-tab.active {
    background: var(--primary-color, #4a90d9);
    border-color: var(--primary-color, #4a90d9);
    color: #fff;
}

/* Canvas 高度 */
#dashTrendChart {
    max-height: 220px;
}

/* 运行中任务列表 */
.dashboard-task-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

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

.dashboard-task-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-task-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-task-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-task-time {
    font-size: 11px;
    color: var(--text-muted, #999);
    white-space: nowrap;
}

.dashboard-task-progress {
    font-size: 12px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

.dashboard-task-error {
    font-size: 12px;
    color: #d9534f;
    line-height: 1.4;
    word-break: break-all;
}

.dashboard-task-section + .dashboard-task-section {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color, #ececec);
}

.dashboard-task-section-title {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #666);
}

/* 发布记录表格 */
.dashboard-records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dashboard-records-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    color: var(--text-secondary, #666);
    background: var(--bg-secondary, #fafafa);
    border-bottom: 1px solid var(--border-color, #eee);
    white-space: nowrap;
}

.dashboard-records-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color, #f5f5f5);
    color: var(--text-primary, #333);
}

.dashboard-records-table tbody tr:last-child td {
    border-bottom: none;
}

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

.publish-record-screenshot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 45px;
    padding: 0;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-secondary, #f8fafc);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.publish-record-screenshot-link:hover {
    border-color: var(--primary-color, #1890ff);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.18);
    transform: translateY(-1px);
}

.publish-record-screenshot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-record-screenshot-modal {
    z-index: 2100;
}

.publish-record-screenshot-modal-content {
    width: min(1120px, 94vw);
    max-width: 1120px;
    max-height: 92vh;
}

.publish-record-screenshot-preview-body {
    padding: 18px 24px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary, #f8fafc);
}

.publish-record-screenshot-preview-img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.12));
    background: #fff;
}

.publish-record-screenshot-preview-url {
    max-width: 100%;
    font-size: 12px;
    color: var(--text-secondary, #666);
    word-break: break-all;
    text-align: center;
}

/* 快捷操作网格 */
.dashboard-shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dashboard-shortcut-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 10px;
    border: 1px dashed var(--border-color, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary, #666);
}

.dashboard-shortcut-btn i {
    font-size: 20px;
    color: var(--primary-color, #4a90d9);
}

.dashboard-shortcut-btn span {
    font-size: 12px;
}

.dashboard-shortcut-btn:hover {
    background: var(--bg-secondary, #f5f9ff);
    border-color: var(--primary-color, #4a90d9);
    color: var(--primary-color, #4a90d9);
}

/* 空状态 */
.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    color: var(--text-muted, #bbb);
    font-size: 13px;
    text-align: center;
}

/* 响应式：小屏幕 */
@media (max-width: 1100px) {
    .dashboard-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-middle-row,
    .dashboard-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-stat-cards {
        grid-template-columns: 1fr;
    }
}

/* 模板选择按钮hover效果 */
.template-select-btn:hover {
    border-color: var(--primary-color) !important;
    background: var(--bg-primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ── 算力调用记录列表 ── */
.usage-record-row {
    display: grid;
    grid-template-columns: 150px 1fr 60px 100px;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    font-size: 13px;
    gap: 8px;
    transition: background 0.15s;
}
.usage-record-row:last-child { border-bottom: none; }
.usage-record-row:hover { background: #f5f4ff; }
.usage-record-time   { color: var(--text-secondary, #666); font-size: 12px; white-space: nowrap; }
.usage-record-type   { text-align: center; }
.usage-record-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: currentColor;
    white-space: nowrap;
}
.usage-record-type-badge span { mix-blend-mode: multiply; }
.usage-record-status { font-weight: 500; text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }
.usage-record-status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.usage-record-credit { font-weight: 600; text-align: right; white-space: nowrap; }
.usage-record-credit.has-credit { color: #9C27B0; }
.usage-record-credit.no-credit  { color: #bbb; font-weight: 400; }

/* 折叠侧栏时，右侧工作区贴齐侧栏和顶部内容区，避免出现外层灰色留白 */
body.sidebar-collapsed .main-content,
.main-content.main-content-collapsed {
    margin-left: var(--sidebar-collapsed-width) !important;
    padding: 0 !important;
}

body.sidebar-collapsed .page-content,
.main-content.main-content-collapsed .page-content {
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 28px 32px 32px !important;
}

body.sidebar-collapsed .page-content.active,
.main-content.main-content-collapsed .page-content.active {
    min-height: calc(100vh - 64px) !important;
}

.page-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-title-row .sidebar-toggle {
    position: static !important;
    width: 24px;
    height: 24px;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    backdrop-filter: none;
    flex: 0 0 24px;
}

.page-title-row .sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.page-title-row .sidebar-toggle i {
    font-size: 13px;
    transform: none !important;
}

/* ── Agent 对话 ── */
#page-agent-chat {
    padding: 0 !important;
    overflow: hidden;
}

#page-agent-chat.active {
    min-height: calc(100vh - 64px) !important;
}

.agent-chat-container {
    display: flex;
    height: calc(100vh - 64px);
    min-height: 560px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    background: #fff;
}

.agent-sidebar {
    width: 260px;
    flex: 0 0 260px;
    border-right: 1px solid var(--border-color, #e8e8e8);
    background: #fbfcfe;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.agent-sidebar-header {
    height: 64px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.agent-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary, #262626);
}

.agent-new-btn,
.agent-clear-btn,
.agent-send-btn {
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.agent-new-btn,
.agent-clear-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #fff;
    color: var(--text-secondary, #595959);
    border: 1px solid var(--border-color, #e8e8e8);
}

.agent-new-btn:hover,
.agent-clear-btn:hover {
    color: var(--primary-color, #1890ff);
    border-color: var(--primary-color, #1890ff);
}

.agent-session-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.agent-project-list {
    flex: 0 0 auto;
    max-height: 210px;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.agent-sidebar-divider {
    height: 8px;
    background: #f5f7fa;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.agent-session-toolbar {
    height: 42px;
    padding: 0 12px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary, #595959);
    font-size: 13px;
    font-weight: 600;
}

.agent-project-item,
.agent-session-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 34px 10px 12px;
    border-radius: 6px;
    color: var(--text-secondary, #595959);
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
    min-height: 42px;
}

.agent-project-item:hover,
.agent-session-item:hover {
    background: #eef6ff;
}

.agent-project-item.active,
.agent-session-item.active {
    background: var(--primary-color, #1890ff);
    color: #fff;
}

.agent-project-item span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.agent-empty-line {
    padding: 10px 12px;
    color: var(--text-tertiary, #8c8c8c);
    font-size: 12px;
}

.agent-session-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.agent-session-delete {
    position: absolute;
    right: 8px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    opacity: 0;
    cursor: pointer;
}

.agent-session-item:hover .agent-session-delete,
.agent-session-item.active .agent-session-delete {
    opacity: 0.78;
}

.agent-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.agent-chat-header {
    height: 64px;
    padding: 0 22px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 64px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.agent-top-picker {
    flex: 0 0 auto;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 206, 137, 0.32), transparent 34%),
        radial-gradient(circle at 54% 18%, rgba(159, 145, 255, 0.2), transparent 36%),
        radial-gradient(circle at 84% 0%, rgba(126, 213, 204, 0.24), transparent 34%),
        #f7f9fc;
    overflow-x: auto;
    overflow-y: hidden;
}

.agent-pill-list {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.agent-app-pill {
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary, #262626);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(35, 47, 78, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.agent-app-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(35, 47, 78, 0.12);
}

.agent-app-pill.active {
    border-color: #ff6a55;
    background: #fff;
    box-shadow: 0 10px 28px rgba(255, 106, 85, 0.12);
}

.agent-app-pill-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef6ff;
    color: var(--primary-color, #1890ff);
    font-size: 14px;
    flex: 0 0 28px;
}

.agent-app-pill.active .agent-app-pill-icon {
    background: #fff2ef;
    color: #ff5a42;
}

.agent-top-empty {
    min-height: 50px;
    display: flex;
    align-items: center;
    color: var(--text-tertiary, #8c8c8c);
    font-size: 13px;
}

.agent-chat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #262626);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.agent-project-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #262626);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.agent-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-messages {
    flex: 1;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 24px;
    background: #fff;
}

.agent-welcome {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-secondary, #595959);
}

.agent-welcome-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #eef6ff;
    color: var(--primary-color, #1890ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.agent-welcome h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--text-primary, #262626);
}

.agent-welcome p {
    margin: 0 0 20px;
    font-size: 14px;
}

.agent-welcome-tips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.agent-tip {
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 999px;
    background: #fff;
    padding: 8px 14px;
    color: var(--text-secondary, #595959);
    cursor: pointer;
    font-size: 13px;
    max-width: min(520px, 100%);
    white-space: normal;
    line-height: 1.4;
    text-align: center;
    word-break: break-word;
}

.agent-tip:hover {
    color: var(--primary-color, #1890ff);
    border-color: var(--primary-color, #1890ff);
    background: #f5fbff;
}

.agent-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    animation: fadeIn 0.18s ease-out;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.agent-msg.user {
    justify-content: flex-end;
}

.agent-msg-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: min(760px, 74%);
    min-width: 0;
    overflow: hidden;
}

.agent-msg.user .agent-msg-content {
    align-items: flex-end;
    order: 1;
    max-width: min(720px, calc(100% - 44px));
}

.agent-msg.user .agent-msg-avatar {
    order: 2;
}

.agent-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    color: var(--text-secondary, #595959);
}

.agent-msg.user .agent-msg-avatar {
    background: var(--primary-color, #1890ff);
    color: #fff;
}

.agent-msg-bubble {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f5f7fa;
    color: var(--text-primary, #262626);
    line-height: 1.65;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.agent-msg-bubble > * {
    max-width: 100%;
}

.agent-msg.user .agent-msg-bubble {
    background: var(--primary-color, #1890ff);
    color: #fff;
    width: fit-content;
    max-width: min(720px, 100%);
}

.agent-msg-bubble p {
    margin: 0 0 10px;
}

.agent-msg-bubble p:last-child {
    margin-bottom: 0;
}

.agent-msg.assistant .agent-msg-bubble p {
    margin: 0 0 10px;
}

.agent-msg.assistant .agent-msg-bubble p:last-child {
    margin-bottom: 0;
}

.agent-msg.assistant .agent-msg-bubble h1,
.agent-msg.assistant .agent-msg-bubble h2,
.agent-msg.assistant .agent-msg-bubble h3,
.agent-msg.assistant .agent-msg-bubble h4 {
    margin: 12px 0 8px;
    font-size: 15px;
    line-height: 1.45;
}

.agent-msg.assistant .agent-msg-bubble h1:first-child,
.agent-msg.assistant .agent-msg-bubble h2:first-child,
.agent-msg.assistant .agent-msg-bubble h3:first-child,
.agent-msg.assistant .agent-msg-bubble h4:first-child {
    margin-top: 0;
}

.agent-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    margin: 10px 0;
}

.agent-msg.assistant .agent-msg-bubble table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}

.agent-msg.assistant .agent-msg-bubble th,
.agent-msg.assistant .agent-msg-bubble td {
    border: 1px solid var(--border-color, #e8e8e8);
    padding: 7px 9px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.agent-msg.assistant .agent-msg-bubble th {
    background: #f0f5ff;
    font-weight: 600;
}

.agent-msg.assistant .agent-msg-bubble ul,
.agent-msg.assistant .agent-msg-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.agent-msg.assistant .agent-msg-bubble code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef1f5;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}

.agent-msg.assistant .agent-msg-bubble pre {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    background: #1f2933;
    color: #f8fafc;
}

.agent-msg.assistant .agent-msg-bubble pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.agent-msg-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    min-height: 28px;
}

.agent-msg-action {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-tertiary, #8c8c8c);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}

.agent-msg-action:hover {
    background: #f0f2f5;
    color: var(--text-primary, #262626);
}

.agent-confirmation-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.agent-confirmation-button {
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid var(--primary-color, #1890ff);
    border-radius: 8px;
    background: var(--primary-color, #1890ff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.agent-confirmation-button:hover {
    background: #096dd9;
    border-color: #096dd9;
    transform: translateY(-1px);
}

.share-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.share-action-tip {
    margin: 0 0 12px;
    font-size: 13px;
}

.share-action-tip.success {
    color: #67c23a;
}

.share-action-tip.error {
    color: #f56c6c;
}

.agent-share-preview-modal {
    width: min(92vw, 920px);
    max-width: 920px;
    max-height: 92vh;
}

.agent-share-preview-body {
    padding: 18px 28px 0;
    overflow: hidden;
}

.agent-share-preview-stage {
    height: min(68vh, 720px);
    overflow: auto;
    padding: 14px;
    border-radius: 10px;
    background: #f4f6f9;
    border: 1px solid #edf0f5;
}

.agent-share-preview-image {
    display: block;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.agent-share-preview-loading,
.agent-share-preview-error {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #8c8c8c;
    font-size: 15px;
}

.agent-share-preview-error {
    color: #f56c6c;
}

.agent-share-preview-footer {
    justify-content: center;
    gap: 12px;
    padding: 18px 28px 24px;
    border-top: none;
}

.agent-share-preview-footer .btn {
    min-width: 112px;
    justify-content: center;
}

.agent-share-image-capture {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 900px;
    padding: 34px;
    background: #ffffff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    box-sizing: border-box;
}

.agent-share-image-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.agent-share-image-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.agent-share-image-meta {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.agent-share-image-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 0;
}

.agent-share-image-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.agent-share-image-message.user {
    flex-direction: row-reverse;
}

.agent-share-image-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
}

.agent-share-image-message.user .agent-share-image-avatar {
    background: #3b82f6;
    color: #ffffff;
}

.agent-share-image-bubble {
    max-width: 690px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #f4f6f9;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.72;
    word-break: break-word;
}

.agent-share-image-message.user .agent-share-image-bubble {
    background: #3b82f6;
    color: #ffffff;
}

.agent-share-image-bubble p {
    margin: 0 0 10px;
}

.agent-share-image-bubble p:last-child,
.agent-share-image-bubble ul:last-child,
.agent-share-image-bubble ol:last-child,
.agent-share-image-bubble pre:last-child {
    margin-bottom: 0;
}

.agent-share-image-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.agent-share-image-bubble th,
.agent-share-image-bubble td {
    border: 1px solid #d9dee7;
    padding: 8px 10px;
    text-align: left;
}

.agent-share-image-bubble th {
    background: #eef2f7;
}

.agent-share-image-bubble pre {
    overflow: hidden;
    white-space: pre-wrap;
    padding: 12px;
    border-radius: 8px;
    background: #111827;
    color: #f9fafb;
}

.agent-share-image-bubble code {
    font-family: Consolas, Monaco, monospace;
}

.agent-share-image-empty {
    padding: 20px;
    border-radius: 8px;
    background: #f6f7fb;
    color: #8c8c8c;
    text-align: center;
}

.agent-share-image-footer {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    color: #8c8c8c;
    font-size: 13px;
    word-break: break-all;
}

.agent-input-area {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 14px 24px 18px;
    border-top: 1px solid var(--border-color, #e8e8e8);
    background: #fff;
}

.agent-input-area .agent-top-picker {
    display: none;
}

.agent-input-area .agent-pill-list {
    gap: 8px;
}

.agent-input-area .agent-app-pill {
    min-height: 34px;
    padding: 0 12px;
    border-color: var(--border-color, #e8e8e8);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.agent-input-area .agent-app-pill:hover {
    transform: none;
    border-color: var(--primary-color, #1890ff);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.08);
}

.agent-input-area .agent-app-pill.active {
    border-color: var(--primary-color, #1890ff);
    background: #eef6ff;
    box-shadow: none;
}

.agent-input-area .agent-app-pill-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 12px;
}

.agent-input-area .agent-app-pill.active .agent-app-pill-icon {
    background: var(--primary-color, #1890ff);
    color: #fff;
}

.agent-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    padding: 10px 10px 10px 14px;
    transition: all 0.18s;
}

.agent-input-wrapper:focus-within {
    border-color: var(--primary-color, #1890ff);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.agent-input-wrapper textarea {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 36px;
    max-height: 140px;
    resize: none;
    border: none;
    outline: none;
    font-size: 14px;
    line-height: 24px;
    padding: 6px 0;
    box-sizing: border-box;
    color: var(--text-primary, #262626);
    font-family: inherit;
    display: block;
}

.agent-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: 0 0 36px;
    background: var(--primary-color, #1890ff);
    color: #fff;
}

.agent-send-btn:hover:not(:disabled) {
    background: var(--primary-hover, #40a9ff);
}

.agent-send-btn:disabled {
    background: #c9cdd4;
    cursor: not-allowed;
}

.agent-input-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary, #8c8c8c);
}

.agent-settings-panel {
    width: 360px;
    flex: 0 0 360px;
    border-left: 1px solid var(--border-color, #e8e8e8);
    background: #fff;
    display: none;
    flex-direction: column;
    min-height: 0;
}

.agent-settings-panel.active {
    display: flex;
}

.agent-settings-header {
    height: 64px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 64px;
}

.agent-settings-header h3 {
    margin: 0;
    font-size: 16px;
}

.agent-settings-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.agent-settings-footer {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color, #e8e8e8);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.agent-field {
    display: block;
    margin-bottom: 14px;
}

.agent-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #262626);
}

.agent-field input[type="text"],
.agent-field textarea {
    width: 100%;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.agent-checkbox-list,
.agent-tool-list {
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    background: #fbfcfe;
}

.agent-checkbox-list label,
.agent-tool-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #edf0f5;
    font-size: 12px;
}

.agent-checkbox-list label:last-child,
.agent-tool-item:last-child {
    border-bottom: none;
}

.agent-checkbox-list label {
    justify-content: flex-start;
}

.agent-checkbox-list em {
    margin-left: 4px;
    color: var(--text-tertiary, #8c8c8c);
    font-style: normal;
}

.agent-tool-item label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.agent-tool-item label:first-child span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 190px;
}

.agent-tool-confirm {
    flex: 0 0 auto;
    color: var(--text-secondary, #595959);
}

/* 代理商后台 Agent / Project 配置弹窗 */
.agent-admin-dialog {
    width: min(920px, calc(100vw - 48px));
    max-width: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 56px rgba(15, 23, 42, 0.28);
}

.agent-app-dialog {
    width: min(620px, calc(100vw - 48px));
}

.agent-project-dialog {
    width: min(1060px, calc(100vw - 48px));
}

.agent-admin-dialog-header {
    min-height: 74px;
    padding: 18px 24px;
    background: #1677ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.agent-admin-dialog-header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.agent-admin-dialog-header p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.84);
}

.agent-admin-dialog-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.agent-admin-dialog-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.agent-admin-dialog-body {
    max-height: min(72vh, 760px);
    overflow-y: auto;
    padding: 22px 24px 26px;
    background: #f7f9fc;
}

.agent-admin-dialog-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.agent-admin-dialog-footer .btn {
    min-width: 92px;
    height: 38px;
}

.agent-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.agent-admin-form-grid.one-col {
    grid-template-columns: 1fr;
}

.agent-admin-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.agent-admin-field.full {
    grid-column: 1 / -1;
}

.agent-admin-field > span {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.agent-admin-field > span strong {
    color: #ef4444;
}

.agent-admin-field small {
    margin-top: -3px;
    font-size: 12px;
    color: #8a94a6;
}

.agent-admin-field input,
.agent-admin-field textarea,
.agent-admin-icon-row input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9dee8;
    border-radius: 7px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.16s, box-shadow 0.16s;
}

.agent-admin-field input,
.agent-admin-icon-row input {
    height: 40px;
    padding: 8px 11px;
}

.agent-admin-field textarea {
    min-height: 88px;
    padding: 10px 11px;
    resize: vertical;
}

.agent-admin-field input:focus,
.agent-admin-field textarea:focus,
.agent-admin-icon-row input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.agent-admin-input-wrap {
    position: relative;
}

.agent-admin-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a94a6;
    pointer-events: none;
}

.agent-admin-input-wrap input {
    padding-left: 36px;
}

.agent-admin-icon-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
}

.agent-admin-icon-selected {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}

.agent-admin-icon-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e8f3ff;
    color: #1677ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.agent-admin-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.agent-admin-icon-option {
    height: 74px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.16s, box-shadow 0.16s, background 0.16s, color 0.16s;
}

.agent-admin-icon-option i {
    font-size: 18px;
    color: #1677ff;
}

.agent-admin-icon-option span {
    max-width: 100%;
    padding: 0 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-admin-icon-option:hover {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.agent-admin-icon-option.active {
    border-color: #1677ff;
    background: #e8f3ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.agent-admin-default-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.agent-admin-default-option input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #1677ff;
}

.agent-admin-default-option span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.agent-admin-default-option strong {
    color: #1f2937;
    font-size: 14px;
}

.agent-admin-default-option em {
    color: #8a94a6;
    font-size: 12px;
    line-height: 1.5;
    font-style: normal;
}

.agent-admin-default-badge {
    flex: 0 0 auto;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fff7e6;
    color: #d46b08;
    font-size: 11px;
    font-weight: 700;
}

.agent-admin-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    margin: 0 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.agent-admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.agent-admin-tab:hover {
    color: #1677ff;
    background: #eef6ff;
}

.agent-admin-tab.active {
    color: #1677ff;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.agent-admin-section {
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.agent-admin-section:last-child {
    margin-bottom: 0;
}

.agent-admin-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
}

.agent-admin-section-title i {
    color: #1677ff;
}

.agent-admin-choice-list,
.agent-admin-tool-list {
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    background: #fbfcfe;
    overflow-y: auto;
}

.agent-admin-choice-list {
    max-height: 210px;
    padding: 6px;
}

.agent-admin-tool-list {
    max-height: 300px;
}

.agent-admin-choice-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.agent-admin-choice-item:hover {
    background: #eef6ff;
}

.agent-admin-choice-name {
    color: #1f2937;
    font-weight: 600;
}

.agent-admin-choice-type {
    margin-left: 6px;
    color: #8a94a6;
    font-size: 12px;
}

.agent-admin-tool-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f5;
    font-size: 13px;
}

.agent-admin-tool-item:last-child {
    border-bottom: none;
}

.agent-admin-tool-main,
.agent-admin-tool-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agent-admin-tool-text {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.agent-admin-tool-cn,
.agent-admin-tool-en {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-admin-tool-cn {
    color: #1f2937;
    font-weight: 600;
}

.agent-admin-tool-en {
    color: #8a94a6;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 500;
}

.agent-admin-tool-confirm {
    justify-content: flex-end;
    color: #606b7b;
    white-space: nowrap;
}

.agent-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 38px;
}

.agent-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8c8c8c;
    animation: agentBounce 1s infinite ease-in-out;
}

.agent-typing span:nth-child(2) {
    animation-delay: 0.14s;
}

.agent-typing span:nth-child(3) {
    animation-delay: 0.28s;
}

.agent-thinking-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #f5f7fb;
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}

.agent-thinking-status:last-child {
    margin-bottom: 0;
}

.agent-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.agent-thinking-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7aa7ff;
    animation: agentBounce 1s infinite ease-in-out;
}

.agent-thinking-dots span:nth-child(2) {
    animation-delay: 0.14s;
}

.agent-thinking-dots span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes agentBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 760px) {
    .agent-chat-container {
        height: calc(100vh - 64px);
    }

    .agent-sidebar {
        width: 118px;
        flex-basis: 118px;
    }

    .agent-settings-panel.active {
        position: absolute;
        inset: 0 0 0 118px;
        width: auto;
        z-index: 10;
    }

    .agent-sidebar-header {
        padding: 0 10px;
    }

    .agent-sidebar-header h3 {
        font-size: 14px;
    }

    .agent-top-picker {
        padding: 12px;
    }

    .agent-input-area .agent-top-picker {
        padding: 0 0 8px;
    }

    .agent-pill-list {
        gap: 8px;
    }

    .agent-app-pill {
        min-height: 42px;
        padding: 0 14px;
        font-size: 13px;
    }

    .agent-input-area .agent-app-pill {
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .agent-app-pill-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        font-size: 12px;
    }

    .agent-input-area .agent-app-pill-icon {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
        font-size: 11px;
    }

    .agent-session-item {
        padding: 9px 8px;
    }

    .agent-project-item {
        padding: 9px 8px;
    }

    .agent-session-delete {
        display: none;
    }

    .agent-messages {
        padding: 18px 14px;
    }

    .agent-msg-content {
        max-width: 82%;
    }

    .agent-input-area {
        padding: 12px;
    }
}

/* ===== 媒体投放 ===== */
.media-placement-filter,
.media-placement-table-wrap,
.media-placement-empty-card,
.media-recharge-kpi {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}

.media-placement-filter {
    padding: 10px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.media-placement-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.media-placement-chip-group {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: wrap;
}

.media-placement-filter-row + .media-placement-filter-row {
    border-top: 1px solid #f3f4f6;
}

.media-placement-filter-label {
    width: 72px;
    color: var(--text-secondary, #666);
    font-size: 13px;
    flex: 0 0 auto;
}

.media-placement-chip {
    height: 28px;
    padding: 0 12px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
}

.media-placement-chip:hover,
.media-placement-chip.active {
    color: #1677ff;
    background: #eef6ff;
    border-color: #b7dcff;
}

.media-resource-price-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.media-resource-price-input {
    width: 92px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0 12px;
    outline: none;
}

.media-resource-price-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.media-resource-price-confirm {
    height: 34px;
    padding: 0 18px;
    border: 0;
    border-radius: 17px;
    background: #1f2329;
    color: #fff;
    cursor: pointer;
}

.media-resource-price-clear {
    height: 34px;
    border: 0;
    background: transparent;
    color: #333;
    cursor: pointer;
}

.media-resource-advanced-select {
    min-width: 104px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #5f6368;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.media-resource-advanced-select:hover,
.media-resource-advanced-select:focus {
    color: #1677ff;
}

.media-resource-advanced-filter-line {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: wrap;
}

.media-resource-advanced-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #5f6368;
    font-size: 15px;
    font-weight: 500;
}

.media-resource-advanced-filter-item .media-placement-chip-group {
    flex: 0 0 auto;
    width: auto;
    gap: 0;
}

.media-placement-search {
    width: min(360px, 100%);
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 16px;
    outline: none;
    font-size: 14px;
}

.media-placement-search:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.media-resource-tabs,
.publish-account-tabs,
.media-content-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid #edf0f5;
    margin-bottom: 0;
}

.media-resource-tabs {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    padding: 14px 24px 0;
    border: 1px solid var(--border-color, #e5e7eb);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.media-resource-tab-list {
    display: flex;
    align-items: center;
    gap: 28px;
}

.media-resource-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    margin-left: auto;
}

.media-resource-search-btn {
    width: 56px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #1677ff;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.22);
}

.media-resource-search-btn:hover {
    background: #0f6ae8;
}

.media-resource-tab,
.publish-account-tab,
.media-content-tab {
    height: 52px;
    border: 0;
    background: transparent;
    color: #8c8c8c;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.media-resource-tab.active,
.publish-account-tab.active,
.media-content-tab.active {
    color: #1677ff;
}

.media-resource-tab.active::after,
.publish-account-tab.active::after,
.media-content-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #1677ff;
}

.media-placement-table-wrap {
    overflow: hidden;
}

.placement-list-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    flex-wrap: wrap;
}

.placement-list-status {
    width: 140px;
    height: 44px;
    padding: 0 38px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.placement-list-status:focus,
.placement-list-date-range:focus-within,
.placement-list-search input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.placement-list-date-range {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #9aa3b2;
    background: #fff;
}

.placement-list-date-range input {
    width: 128px;
    border: 0;
    outline: none;
    color: #4b5563;
    font-size: 14px;
    background: transparent;
}

.placement-list-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.placement-list-search input {
    width: min(360px, 42vw);
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.placement-list-search button {
    width: 54px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #1677ff;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.22);
}

.placement-list-search button:hover {
    background: #0f6ae8;
}

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

.media-placement-table th {
    background: #f7f8fa;
    color: #555;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.media-placement-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #333;
    vertical-align: middle;
}

.media-placement-table tr:hover td {
    background: #fafcff;
}

.media-resource-check-col {
    width: 46px;
    text-align: center !important;
}

.media-resource-check-col input,
.media-resource-row-check {
    width: 18px;
    height: 18px;
    accent-color: #1677ff;
    cursor: pointer;
}

.media-resource-favorite-btn {
    border: 0;
    background: transparent;
    color: #c7c7c7;
    font-size: 20px;
    cursor: pointer;
}

.media-resource-favorite-btn.active {
    color: #f59f00;
}

.media-placement-name {
    color: #1677ff;
    font-weight: 600;
    text-decoration: none;
}

.media-placement-name:hover {
    text-decoration: underline;
}

.media-placement-price {
    color: #d46b08;
    font-weight: 700;
    white-space: nowrap;
}

.placement-publish-url {
    margin-top: 6px;
    color: #777;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-all;
}

.placement-publish-url a {
    color: #1677ff;
    text-decoration: none;
}

.placement-publish-url a:hover {
    text-decoration: underline;
}

.media-placement-weight {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1677ff;
    font-weight: 600;
}

.media-resource-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 18px 20px 22px;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.03);
}

.media-resource-total {
    color: #8c8c8c;
    font-size: 14px;
    margin-right: 8px;
}

.media-resource-total strong {
    color: #1677ff;
}

.media-resource-page-size {
    height: 36px;
    padding: 0 34px 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 14px;
    outline: none;
}

.media-resource-page-size:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.media-resource-page-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.media-resource-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
}

.media-resource-page-btn:hover:not(:disabled),
.media-resource-page-btn.active {
    border-color: #1677ff;
    color: #1677ff;
    background: #eef6ff;
}

.media-resource-page-btn.active {
    box-shadow: 0 0 0 1px #1677ff inset;
}

.media-resource-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.media-resource-page-ellipsis {
    min-width: 36px;
    text-align: center;
    color: #8c8c8c;
    font-size: 16px;
}

.media-resource-float-bar {
    position: fixed;
    left: var(--sidebar-width, 260px);
    right: 0;
    bottom: 0;
    z-index: 120;
    min-height: 76px;
    padding: 14px 28px;
    background: #fff;
    border-top: 1px solid #edf0f5;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    color: #333;
}

.media-resource-float-bar strong {
    color: #1677ff;
    font-size: 18px;
}

#mediaResourceSelectedPrice {
    color: #fa8c16;
}

.media-resource-clear-btn {
    border: 0;
    background: transparent;
    color: #8c8c8c;
    cursor: pointer;
}

.media-resource-publish-btn {
    border-radius: 28px;
    padding: 0 24px;
    height: 48px;
}

.media-content-select-modal {
    max-width: 880px;
    width: 92%;
}

.media-content-tabs {
    padding: 0 4px;
    margin-bottom: 18px;
}

.media-content-search {
    width: 100%;
    height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.media-content-search:focus {
    border-color: #1677ff;
}

.media-content-select-list {
    max-height: 460px;
    overflow-y: auto;
    padding: 12px 0;
}

.media-content-item {
    display: grid;
    grid-template-columns: 64px 1fr 34px;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    cursor: pointer;
}

.media-content-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background: #f0f2f5;
    color: #b7b7b7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.media-content-title {
    color: #222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.media-content-meta {
    margin-top: 8px;
    color: #8c8c8c;
    font-size: 13px;
}

.media-content-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #d9d9d9;
    border-radius: 50%;
}

.media-content-item.active .media-content-radio {
    border-color: #1677ff;
    box-shadow: inset 0 0 0 5px #fff;
    background: #1677ff;
}

.media-content-select-footer {
    gap: 12px;
}

.media-placement-confirm-modal {
    max-width: 760px;
    width: 90%;
}

.media-placement-confirm-section {
    padding: 8px 0 22px;
    border-bottom: 1px solid #edf0f5;
}

.media-placement-confirm-section h4 {
    margin: 0 0 14px;
    color: #8c8c8c;
    font-size: 15px;
    font-weight: 700;
}

.media-placement-confirm-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #f7f8fa;
}

.media-placement-confirm-content strong {
    color: #222;
    font-size: 17px;
    line-height: 1.4;
}

.media-placement-confirm-media-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.media-placement-confirm-media-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #f7f8fa;
    color: #222;
    font-weight: 700;
}

.media-placement-confirm-media-item strong {
    color: #fa8c16;
    font-size: 18px;
}

.media-placement-confirm-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 8px;
    color: #666;
    font-size: 16px;
    font-weight: 700;
}

.media-placement-confirm-total strong {
    color: #fa8c16;
    font-size: 30px;
}

.media-placement-confirm-note {
    margin: 8px 0 0;
    color: #8c8c8c;
    font-size: 14px;
}

#mediaContentSelectHint {
    margin-right: auto;
    color: #8c8c8c;
}

.publish-account-tabs {
    margin: 24px 0 18px;
}

.publish-favorite-media-list {
    max-height: 440px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    background: #f7f8fa;
}

.publish-favorite-media-item {
    display: grid;
    grid-template-columns: 36px 56px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.publish-favorite-media-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #1677ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.publish-favorite-media-name {
    color: #222;
    font-size: 16px;
    font-weight: 700;
}

.publish-favorite-media-meta {
    margin-top: 6px;
    color: #8c8c8c;
    font-size: 13px;
}

.publish-favorite-media-price {
    color: #fa8c16;
    font-size: 18px;
    font-weight: 700;
}

.media-placement-empty-card {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-secondary, #666);
}

.media-placement-empty-card i {
    font-size: 40px;
    color: #b9c2d0;
    margin-bottom: 14px;
}

.media-placement-empty-card div {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #111);
}

.media-placement-empty-card p {
    margin: 8px auto 0;
    max-width: 520px;
    font-size: 13px;
}

.media-recharge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.recharge-summary-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.recharge-summary-card {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.recharge-summary-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.recharge-summary-card--credits .recharge-summary-card__icon {
    background: #f0f4ff;
    color: #5b73e8;
}

.recharge-summary-card--media .recharge-summary-card__icon {
    background: #fff8ed;
    color: #e8973a;
}

.recharge-summary-card__content {
    flex: 1;
    min-width: 0;
}

.recharge-summary-card__label {
    font-size: 13px;
    color: var(--text-secondary, #888);
    margin-bottom: 4px;
}

.recharge-summary-card__value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 4px;
}

.recharge-summary-card--credits .recharge-summary-card__value {
    color: #4a63d3;
}

.recharge-summary-card--media .recharge-summary-card__value {
    color: #c97c2a;
}

.recharge-summary-card__hint {
    font-size: 12px;
    color: var(--text-tertiary, #bbb);
}

.media-recharge-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 16px 0;
}

.media-recharge-tab {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 10px 4px;
    color: #666;
    cursor: pointer;
}

.media-recharge-tab.active {
    color: #1677ff;
    border-bottom-color: #1677ff;
    font-weight: 600;
}

.media-recharge-records {
    padding: 14px 16px 18px;
}

.ledger-record-title {
    font-weight: 600;
    color: #333;
}

.media-recharge-records .ledger-income {
    color: #16a34a;
}

.media-recharge-records .ledger-expense {
    color: #a855f7;
}

.media-recharge-pagination,
.placement-list-pagination {
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px 22px;
    background: #fff;
}

.media-recharge-pagination .media-resource-total,
.placement-list-pagination .media-resource-total {
    font-size: 15px;
    margin-right: 8px;
}

.media-recharge-pagination .media-resource-page-size,
.placement-list-pagination .media-resource-page-size {
    width: 132px;
    height: 42px;
    border-radius: 8px;
    font-size: 15px;
}

.media-recharge-pagination .media-resource-page-btn,
.media-recharge-pagination .media-resource-page-number,
.placement-list-pagination .media-resource-page-btn,
.placement-list-pagination .media-resource-page-number {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.media-recharge-pagination .media-resource-page-number.active,
.placement-list-pagination .media-resource-page-number.active {
    border-color: #1677ff;
    background: #e8f3ff;
    color: #1677ff;
    box-shadow: inset 0 0 0 1px #1677ff;
}

.media-recharge-pagination .media-resource-page-btn:disabled,
.placement-list-pagination .media-resource-page-btn:disabled {
    color: #b8bec9;
    background: #fff;
}

.media-recharge-pagination .media-resource-page-list,
.placement-list-pagination .media-resource-page-list {
    gap: 8px;
}

.media-recharge-pagination .media-resource-page-ellipsis,
.placement-list-pagination .media-resource-page-ellipsis {
    min-width: 42px;
    text-align: center;
    color: #8c8c8c;
}

.media-recharge-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.45);
    align-items: center;
    justify-content: center;
}

.media-recharge-modal {
    width: 560px;
    max-width: 95vw;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    position: relative;
    box-shadow: 0 12px 44px rgba(0,0,0,0.18);
}

.media-recharge-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: none;
    background: transparent;
    font-size: 22px;
    color: #999;
    cursor: pointer;
}

.media-recharge-modal-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.media-recharge-modal-tabs button {
    border: none;
    background: transparent;
    padding: 10px 6px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #666;
}

.media-recharge-modal-tabs button.active {
    color: #1677ff;
    border-bottom-color: #1677ff;
    font-weight: 600;
}

.media-recharge-package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.media-recharge-package-grid button {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 14px 8px;
    cursor: pointer;
    text-align: center;
}

.media-recharge-package-grid button.selected {
    border-color: #1677ff;
    background: #eef6ff;
}

.media-recharge-package-grid strong,
.media-recharge-package-grid span {
    display: block;
}

.media-recharge-package-grid strong {
    color: #d46b08;
    margin-bottom: 4px;
}

.media-recharge-package-grid span {
    color: #888;
    font-size: 12px;
}

.media-recharge-submit {
    width: 100%;
    margin-top: 18px;
    padding: 13px 0;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.media-recharge-pay-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f0f6ff;
    color: #555;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 900px) {
    .media-placement-table-wrap {
        overflow-x: auto;
    }

    .media-placement-table {
        min-width: 980px;
    }

    .media-recharge-kpis,
    .media-recharge-package-grid {
        grid-template-columns: 1fr;
    }
}
