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

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-bg: #eff6ff;
    --accent: #0ea5e9;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* 初始化向导 */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.onboarding-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.onboarding-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.onboarding-header p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.progress-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    width: 25%;
    transition: width 0.3s;
}

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

.onboarding-content {
    min-height: 280px;
    padding: 24px 0;
}

.onboarding-step h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.onboarding-step p.desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.onboarding-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* 主应用布局 */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--text-primary) 0%, #16213e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 24px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: rgba(255, 255, 255, 0.55);
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
    background: rgba(0, 184, 148, 0.12);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.nav-item:hover .nav-dot {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.nav-item.active .nav-dot {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.5);
}

.nav-label {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.shop-info:hover {
    opacity: 0.85;
}

.shop-info:hover .shop-name {
    color: var(--primary-light);
}

.shop-info:hover .shop-type {
    color: var(--primary);
}

.shop-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

.shop-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 3px;
    transition: color 0.2s ease;
}

.btn-settings {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* 主内容区 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-header h1 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* 按钮 */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

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

.btn-secondary:hover {
    background: var(--border);
}

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

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.stat-card.clickable:hover::before {
    height: 100%;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

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

.stat-card.clickable:hover .stat-value {
    color: var(--primary);
}

.stat-arrow {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 300;
    transition: all 0.25s ease;
    opacity: 0;
    transform: translateX(-4px);
}

.stat-card.clickable:hover .stat-arrow {
    opacity: 1;
    color: var(--primary);
    transform: translateX(0);
}

/* 卡片 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

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

.card-header h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.card-arrow {
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.clickable-card {
    cursor: pointer;
    transition: all 0.25s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-light);
}

.clickable-card:hover .card-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 仪表盘widget布局 */
.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-widgets.edit-mode .widget-card {
    border: 2px dashed var(--border);
    position: relative;
}

.widget-card {
    position: relative;
    transition: all 0.25s ease;
}

.widget-card.widget-full {
    grid-column: 1 / -1;
}

.widget-actions {
    position: absolute;
    top: -10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.edit-mode .widget-actions {
    opacity: 1;
}

.widget-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.widget-action-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.dashboard-add-widget {
    text-align: center;
    margin-bottom: 20px;
}

/* 板块选择器 */
.widget-picker-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.widget-picker-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.widget-picker-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.widget-picker-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.empty-text {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.empty-text-sm {
    color: #bbb;
    text-align: center;
    font-size: 12px;
    padding: 12px;
}

/* 店铺画像 */
.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

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

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

.profile-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* AI建议 */
.suggestion-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

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

.suggestion-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

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

/* 待办提醒 */
.reminder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.reminder-item:hover {
    opacity: 0.8;
}

.reminder-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.reminder-title {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.reminder-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.reminder-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reminder-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.filter-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--border);
    padding: 4px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-tab-add {
    color: var(--primary);
    font-weight: 500;
}

.filter-tab-add:hover {
    background: var(--primary-bg);
}

.view-switch {
    display: flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 7px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: var(--bg-page);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.search-box input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 220px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.product-category-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 8px;
}

.cat-dried { background: var(--primary-bg); color: #2e7d32; }
.cat-instant { background: dbeafe; color: #1565c0; }
.cat-half-dried { background: fef3c7; color: #e65100; }
.cat-gift { background: fee2e2; color: #c2185b; }
.cat-other { background: #f3e5f5; color: #7b1fa2; }

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

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.product-price {
    color: var(--danger);
    font-weight: 600;
    font-size: 18px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.product-tag {
    padding: 2px 6px;
    background: var(--border-light);
    border-radius: 4px;
    font-size: 11px;
    color: #888;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.product-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 6px 8px;
    font-size: 12px;
}

/* 产品列表视图 */
.products-list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-row {
    display: grid;
    grid-template-columns: 1fr 100px 100px 100px 80px 120px;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    background: white;
    transition: background 0.2s;
}

.product-row:first-child {
    border-radius: 12px 12px 0 0;
}

.product-row:last-child {
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.product-row:hover {
    background: var(--bg-page);
}

.product-row-header {
    background: var(--bg-page);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    border-radius: 12px 12px 0 0;
}

.product-row-header:hover {
    background: var(--bg-page);
}

.product-row-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.product-row-cat {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.product-row-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.product-row-stock {
    font-size: 13px;
    color: var(--text-secondary);
}

.product-row-stock.low {
    color: #f59e0b;
}

.product-row-profit {
    font-size: 13px;
    color: #10b981;
}

.product-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.product-row-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* 分类管理 */
.category-add-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.category-add-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.category-add-row input:focus {
    border-color: var(--primary);
}

.category-list {
    max-height: 300px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-page);
    border-radius: 8px;
    margin-bottom: 8px;
}

.category-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item-icon {
    font-size: 18px;
}

.category-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.category-item-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.category-item-actions {
    display: flex;
    gap: 6px;
}

.category-item-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

.category-tip {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--primary-bg);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 聊天 */
.chat-tools select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
}

.chat-container {
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message-ai .message-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.message-user .message-avatar {
    background: var(--border);
}

.message-content {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 70%;
    line-height: 1.7;
}

.message-user {
    flex-direction: row-reverse;
}

.message-user .message-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-q {
    padding: 4px 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.quick-q:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-wrapper textarea:focus {
    border-color: var(--primary);
}

.btn-send {
    padding: 10px 24px;
    height: 40px;
}

/* 营销 */
.marketing-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    height: calc(100vh - 180px);
}

.marketing-form-card,
.marketing-result-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    overflow: hidden;
}

.marketing-form-card .card-body,
.marketing-result-card .card-body {
    flex: 1;
    overflow-y: auto;
}

.type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.type-tab {
    padding: 8px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.type-tab.active {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
    font-weight: 500;
}

.marketing-result {
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-primary);
}

.history-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.marketing-history {
    max-height: 120px;
    overflow-y: auto;
}

.history-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.history-item:hover {
    background: #eff6ff;
}

.history-item-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.history-item-time {
    color: var(--text-muted);
    font-size: 11px;
}

/* 客户列表 */
.customers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-item {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    cursor: pointer;
}

.customer-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.customer-info {
    flex: 1;
}

.customer-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

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

.customer-type-tag {
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.type-vip { background: #fff8e1; color: #f57f17; }
.type-normal { background: var(--primary-bg); color: #2e7d32; }
.type-potential { background: dbeafe; color: #1565c0; }
.type-enterprise { background: #f3e5f5; color: #7b1fa2; }

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

.customer-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.customer-tag {
    padding: 1px 6px;
    background: var(--border-light);
    border-radius: 4px;
    font-size: 11px;
    color: #888;
}

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

.followup-badge {
    padding: 4px 10px;
    background: fef3c7;
    color: #e65100;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* 知识库 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.knowledge-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    border: 1px solid transparent;
    overflow: hidden;
}

.knowledge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.knowledge-card:hover::before {
    height: 100%;
}

.knowledge-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--border-light);
    line-height: 1;
    margin-bottom: 12px;
    display: block;
    transition: color 0.25s ease;
    font-family: 'Georgia', serif;
}

.knowledge-card:hover .knowledge-num {
    color: var(--primary);
}

.knowledge-card h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    transition: color 0.25s ease;
}

.knowledge-card:hover h3 {
    color: var(--primary);
}

.knowledge-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.knowledge-arrow {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 300;
    transition: all 0.25s ease;
    display: inline-block;
}

.knowledge-card:hover .knowledge-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

#knowledge-detail {
    margin-bottom: 40px;
}

.knowledge-content {
    line-height: 2;
}

.knowledge-content h4 {
    color: var(--primary);
    margin: 16px 0 8px;
    font-size: 15px;
}

.knowledge-content p {
    color: #555;
    margin-bottom: 8px;
}

.knowledge-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.knowledge-content li {
    color: #555;
    margin-bottom: 4px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

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

.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

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

/* 选项卡片 */
.option-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-card {
    padding: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card:hover {
    border-color: var(--primary);
}

.option-card.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.option-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.option-card-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* 记账本 */
.record-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

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

.record-item:hover {
    background: f8fafc;
}

.record-product {
    flex: 1;
    min-width: 0;
}

.record-product-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

.record-amount {
    text-align: right;
    min-width: 100px;
}

.record-amount-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--danger);
}

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

.record-date {
    font-size: 12px;
    color: #bbb;
    min-width: 90px;
    text-align: right;
}

.record-delete {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}

.record-delete:hover {
    color: var(--danger);
    background: #fef0f0;
}

/* 销售分析 */
.analysis-tools select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
}

.trend-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 0;
}

.trend-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
    transition: all 0.3s;
}

.trend-bar:hover {
    opacity: 0.8;
}

.trend-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.trend-bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    gap: 12px;
}

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

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

.ranking-num.top1 { background: #ffd700; color: #8b6914; }
.ranking-num.top2 { background: #c0c0c0; color: var(--text-secondary); }
.ranking-num.top3 { background: #cd7f32; color: #fff; }
.ranking-num.normal { background: var(--border); color: var(--text-muted); }

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

.ranking-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 13px;
}

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

.ranking-amount {
    font-weight: 600;
    color: var(--danger);
    font-size: 14px;
}

.product-tip-card {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

.product-tip-card.cold {
    border-left-color: var(--danger);
}

.product-tip-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.product-tip-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.product-tip-action {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.product-tip-card.cold .product-tip-action {
    color: var(--danger);
}

.business-suggestion {
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
}

.business-suggestion:last-child {
    margin-bottom: 0;
}

.business-suggestion-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.business-suggestion-content {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

/* 百科搜索 */
.knowledge-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.knowledge-search-box {
    flex: 1;
    display: flex;
    gap: 8px;
}

.knowledge-search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.knowledge-search-box input:focus {
    border-color: var(--primary);
}

.search-result-item {
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #eff6ff;
}

.search-result-title {
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 4px;
}

.search-result-preview {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.search-result-preview mark {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* 快捷入口 */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.quick-action-card {
    background: white;
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.quick-action-card:hover::before {
    height: 100%;
}

.quick-action-card.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: white;
}

.quick-action-card.primary::before {
    background: white;
}

.quick-action-card.secondary {
    background: white;
    border-color: var(--border-light);
}

.quick-action-num {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1;
    opacity: 0.3;
}

.quick-action-card.primary .quick-action-num {
    opacity: 0.4;
}

.quick-action-info {
    flex: 1;
}

.quick-action-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-action-desc {
    font-size: 13px;
    opacity: 0.75;
}

.quick-action-card.secondary .quick-action-desc {
    color: var(--text-muted);
    opacity: 1;
}

.quick-action-arrow {
    font-size: 20px;
    font-weight: 300;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s ease;
}

.quick-action-card:hover .quick-action-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 记账大按钮 */
.record-action-banner {
    margin-bottom: 20px;
}

.btn-record-big {
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-record-big:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.btn-record-big:active {
    transform: translateY(0);
}

.btn-record-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.btn-record-text {
    letter-spacing: 2px;
}

/* 产品搜索 */
.product-search-wrapper {
    position: relative;
}

.product-search-wrapper input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.product-search-wrapper input:focus {
    border-color: var(--primary);
}

.product-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.product-search-item:hover {
    background: var(--primary-bg);
}

.product-search-item-name {
    font-weight: 500;
    font-size: 14px;
}

.product-search-item-price {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.product-search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.product-selected-tip {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--primary-bg);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 500;
}

.clear-selected {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    padding: 0 4px;
    line-height: 1;
}

.clear-selected:hover {
    color: var(--danger);
}

/* 利润排行 */
.profit-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
    gap: 12px;
}

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

.profit-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    background: var(--primary-bg);
    color: var(--primary);
}

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

.profit-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 13px;
}

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

.profit-amount {
    text-align: right;
}

.profit-amount-value {
    font-weight: 600;
    color: var(--success);
    font-size: 14px;
}

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

/* 设置面板 */
.modal-large {
    max-width: 720px !important;
}

/* 会员详情 */
.customer-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.customer-detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    flex-shrink: 0;
}

.customer-detail-info {
    flex: 1;
}

.customer-detail-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.customer-detail-tag {
    padding: 2px 10px;
    background: var(--bg-page);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 12px;
}

.customer-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.customer-detail-stat {
    background: var(--bg-page);
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.customer-detail-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.customer-detail-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.customer-detail-section {
    margin-bottom: 20px;
}

.customer-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.customer-detail-field {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.customer-detail-field-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.customer-detail-records {
    max-height: 200px;
    overflow-y: auto;
}

.customer-detail-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.customer-detail-record:last-child {
    border-bottom: none;
}

.customer-detail-record-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.customer-detail-record-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-detail-actions {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

.customer-detail-actions .btn {
    flex: 1;
    justify-content: center;
}

.settings-layout {
    display: flex;
    min-height: 420px;
}

.settings-sidebar {
    width: 170px;
    background: var(--bg-page);
    border-right: 1px solid var(--border-light);
    padding: 12px 0;
    flex-shrink: 0;
}

.settings-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.settings-tab-num {
    font-size: 11px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    transition: all 0.2s;
    width: 20px;
}

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

.settings-tab:hover .settings-tab-num {
    color: var(--primary);
    opacity: 1;
}

.settings-tab.active {
    background: white;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.settings-tab.active .settings-tab-num {
    color: var(--primary);
    opacity: 1;
}

.settings-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: 500px;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

/* 主题选择 */
.theme-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.theme-option {
    text-align: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.theme-option:hover {
    background: var(--bg-page);
}

.theme-option.active {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.theme-preview {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.theme-option span {
    font-size: 12px;
    color: var(--text-secondary);
}

.theme-option.active span {
    color: var(--primary);
    font-weight: 500;
}

/* 菜单排序 */
.nav-sort-list {
    background: var(--bg-page);
    border-radius: 8px;
    padding: 8px;
}

.nav-sort-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 6px;
    gap: 10px;
    border: 1px solid var(--border-light);
}

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

.nav-sort-drag {
    cursor: grab;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
    width: 20px;
    text-align: center;
}

.nav-sort-drag:active {
    cursor: grabbing;
}

.nav-sort-num {
    font-size: 11px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    width: 22px;
}

.nav-sort-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.nav-sort-actions {
    display: flex;
    gap: 4px;
}

.nav-sort-btn {
    padding: 4px 10px;
    height: 28px;
    border: none;
    background: var(--bg-page);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-sort-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-sort-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-sort-btn.hide-btn.active {
    color: var(--text-muted);
    opacity: 0.5;
}

/* 数据管理 */
.data-action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-page);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.data-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.data-stat-item {
    background: var(--bg-page);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

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

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

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* 订单详情 */
.order-detail-modal .modal {
    max-width: 480px;
}

.order-detail-section {
    margin-bottom: 20px;
}

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

.order-detail-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.order-detail-row .label {
    color: var(--text-secondary);
}

.order-detail-row .value {
    color: var(--text-primary);
    font-weight: 500;
}

.order-detail-row .value.highlight {
    color: var(--primary);
    font-weight: 600;
}

.order-detail-row .value.profit {
    color: var(--success);
    font-weight: 600;
}

.order-detail-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 0;
}

.record-item.clickable {
    cursor: pointer;
}

.record-item.clickable:hover {
    background: var(--primary-bg);
}

/* 可点击统计卡片 */
.stat-card.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 店面运营 */
.ops-mode-switch {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-light);
}

.ops-mode-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.ops-mode-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.ops-categories {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.ops-cat-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 400;
}

.ops-cat-num {
    font-size: 11px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.6;
    transition: all 0.2s;
}

.ops-cat-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.ops-cat-btn:hover .ops-cat-num {
    color: var(--primary);
    opacity: 1;
}

.ops-cat-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.ops-cat-btn.active .ops-cat-num {
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

.ops-content {
    display: none;
}

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

.ops-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ops-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-light);
}

.ops-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.ops-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.ops-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ops-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.ops-card-tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* 运营详情 */
.ops-detail-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-bg);
}

.ops-detail-content h4:first-child {
    margin-top: 0;
}

.ops-detail-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.ops-detail-content p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.ops-detail-content ul, .ops-detail-content ol {
    margin: 10px 0 10px 20px;
}

.ops-detail-content li {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ops-detail-content strong {
    color: var(--text-primary);
}

.ops-detail-tip {
    background: var(--primary-bg);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 3px solid var(--primary);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 文案素材库 */
.copy-library-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 220px);
    min-height: 500px;
}

.copy-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.copy-search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.copy-search-box input:focus {
    border-color: var(--primary);
}

.copy-cat-list {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 8px 0;
    border: 1px solid var(--border-light);
    overflow-y: auto;
}

.copy-cat-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.copy-cat-item:hover {
    background: var(--bg-page);
}

.copy-cat-item.active {
    background: var(--primary-bg);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.copy-cat-num {
    font-size: 11px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    margin-right: 6px;
    transition: all 0.2s;
}

.copy-cat-item:hover .copy-cat-num,
.copy-cat-item.active .copy-cat-num {
    color: var(--primary);
    opacity: 1;
}

.copy-cat-count {
    font-size: 11px;
    background: var(--bg-page);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-muted);
}

.copy-cat-item.active .copy-cat-count {
    background: white;
    color: var(--primary);
}

.copy-stats {
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.copy-stats span {
    color: var(--primary);
    font-weight: 600;
}

.copy-main {
    flex: 1;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

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

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

.copy-sort {
    display: flex;
    background: var(--bg-page);
    border-radius: 6px;
    padding: 2px;
}

.copy-sort-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.copy-sort-btn.active {
    background: white;
    color: var(--primary);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.copy-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.copy-item {
    background: var(--bg-page);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.copy-item:hover {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.copy-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.copy-item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.copy-item-tag {
    padding: 2px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.copy-item-actions {
    display: flex;
    gap: 6px;
}

.copy-item-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

.copy-item-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.copy-item-content {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.copy-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.copy-item-stats {
    display: flex;
    gap: 12px;
}

.copy-item-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* AI顾问模式 */
.ops-advisor-content {
    height: calc(100vh - 200px);
    min-height: 500px;
}

.advisor-layout {
    display: flex;
    height: 100%;
    gap: 16px;
}

.advisor-sidebar {
    width: 200px;
    background: white;
    border-radius: 12px;
    padding: 16px 0;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    overflow-y: auto;
}

.advisor-sidebar-title {
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.advisor-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.advisor-item:hover {
    background: var(--bg-page);
}

.advisor-item.active {
    background: var(--primary-bg);
    border-left-color: var(--primary);
}

.advisor-item-num {
    font-size: 12px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    width: 22px;
    transition: all 0.2s;
}

.advisor-item:hover .advisor-item-num,
.advisor-item.active .advisor-item-num {
    opacity: 1;
    color: var(--primary);
}

.advisor-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.advisor-item.active .advisor-item-name {
    color: var(--primary);
}

.advisor-chat-area {
    flex: 1;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

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

.advisor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.advisor-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Georgia', 'Times New Roman', serif;
}

.advisor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

.advisor-tags {
    display: flex;
    gap: 6px;
}

.advisor-tag {
    padding: 3px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.advisor-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.advisor-welcome {
    text-align: center;
    padding: 30px 20px;
}

.advisor-welcome-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.advisor-welcome-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.advisor-quick-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
    align-items: stretch;
}

.quick-question-btn {
    padding: 12px 16px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
    transition: all 0.2s;
}

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

.advisor-msg {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.advisor-msg.user {
    justify-content: flex-end;
}

.advisor-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.advisor-msg.ai .advisor-msg-avatar {
    background: var(--primary-bg);
    color: var(--primary);
}

.advisor-msg.user .advisor-msg-avatar {
    background: #e2e8f0;
    color: #64748b;
}

.advisor-msg-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7;
}

.advisor-msg.ai .advisor-msg-content {
    background: var(--bg-page);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.advisor-msg.user .advisor-msg-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.advisor-msg-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 8px;
}

.advisor-msg-content h4:first-child {
    margin-top: 0;
}

.advisor-msg-content ul, .advisor-msg-content ol {
    margin: 8px 0 8px 20px;
}

.advisor-msg-content li {
    margin-bottom: 4px;
}

.advisor-msg-content strong {
    font-weight: 600;
}

.advisor-chat-input {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.advisor-chat-input textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.advisor-chat-input textarea:focus {
    border-color: var(--primary);
}

.advisor-chat-input .btn {
    height: 38px;
    flex-shrink: 0;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-page);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.ops-advisor-content.hidden {
    display: none;
}

/* 响应式 */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .marketing-layout {
        grid-template-columns: 1fr;
    }
    .knowledge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo-text, .nav-item span:last-child, .shop-info {
        display: none;
    }
    .main-content {
        padding: 16px;
    }
    .page-header {
        flex-direction: column;
        gap: 12px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box input {
        width: 100%;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .option-cards {
        grid-template-columns: 1fr;
    }
}

/* ========== 店面运营中心 · 八大系统 ========== */

/* 店铺定位摘要条 */
.ops-profile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 60%, #2563eb 100%);
    color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.18);
}

.ops-profile-bar:hover {
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.28);
    transform: translateY(-1px);
}

.ops-profile-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.ops-profile-shop {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.ops-profile-sep {
    opacity: 0.4;
    margin: 0 2px;
}

.ops-profile-warn {
    color: #fde68a;
    font-weight: 500;
}

.ops-profile-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 八大系统网格 */
.ops-systems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ops-system-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.ops-system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.2s;
}

.ops-system-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
    border-color: var(--primary-light);
}

.ops-system-card:hover::before {
    opacity: 1;
}

.ops-system-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ops-system-icon {
    font-size: 22px;
    line-height: 1;
}

.ops-system-num {
    font-size: 11px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    opacity: 0.7;
}

.ops-system-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ops-system-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 10px;
}

.ops-system-desc {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ops-system-foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
}

.ops-system-enter {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.ops-system-card:hover .ops-system-enter {
    color: var(--primary);
}

/* 工作台顶部栏 */
.ops-wb-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ops-wb-back {
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.ops-wb-back:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.ops-wb-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.ops-wb-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.ops-wb-tagline {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 方法论卡 */
.ops-wb-method {
    background: var(--primary-bg);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ops-wb-method-label {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}

.ops-wb-method-body {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* 工作台 Tab */
.ops-wb-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
}

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

.ops-wb-tab:hover {
    color: var(--primary);
}

.ops-wb-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.ops-wb-panel {
    display: none;
}

.ops-wb-panel.active {
    display: block;
}

/* 内容库：左模块导航 + 右内容 */
.ops-wb-library-layout {
    display: flex;
    gap: 16px;
    min-height: 480px;
}

.ops-wb-modnav {
    width: 240px;
    flex-shrink: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 8px;
    align-self: flex-start;
    position: sticky;
    top: 16px;
}

.ops-wb-mod-item {
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.ops-wb-mod-item:hover {
    background: var(--bg-page);
}

.ops-wb-mod-item.active {
    background: var(--primary-bg);
    border-left-color: var(--primary);
}

.ops-wb-mod-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ops-wb-mod-item.active .ops-wb-mod-name {
    color: var(--primary);
}

.ops-wb-mod-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.ops-wb-modmain {
    flex: 1;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 0;
}

.ops-wb-mod-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.ops-wb-mod-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ops-wb-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ops-wb-item {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 18px 20px;
    transition: all 0.2s;
}

.ops-wb-item:hover {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.ops-wb-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

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

.ops-wb-item-scene {
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ops-wb-item-content {
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

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

.ops-wb-item-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 6px;
}

.ops-wb-item-content ul {
    margin: 6px 0 6px 20px;
}

.ops-wb-item-content li {
    margin-bottom: 4px;
}

.ops-wb-item-tip {
    font-size: 12px;
    line-height: 1.7;
    color: var(--warning);
    background: #fffbeb;
    border-left: 3px solid var(--warning);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin-top: 12px;
}

.ops-wb-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

/* AI定制工作台：左表单 + 右结果 */
.ops-ai-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ops-ai-form-panel {
    width: 420px;
    flex-shrink: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 16px;
}

.ops-ai-step-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 18px 0 10px;
}

.ops-ai-step-title:first-child {
    margin-top: 0;
}

.ops-ai-step-num {
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.ops-ai-scenarios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ops-scenario-chip {
    border: 1px solid var(--border);
    background: var(--bg-page);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.ops-scenario-chip:hover {
    border-color: var(--primary-light);
    background: white;
}

.ops-scenario-chip.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 1px var(--primary);
}

.ops-scenario-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ops-scenario-chip.active .ops-scenario-name {
    color: var(--primary);
}

.ops-scenario-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.ops-ai-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ops-ai-form-hint {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-page);
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
}

.ops-ai-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.ops-ai-field input,
.ops-ai-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: white;
    font-family: inherit;
}

.ops-ai-field input:focus,
.ops-ai-field select:focus {
    border-color: var(--primary);
}

.ops-ai-idea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.6;
    margin-bottom: 14px;
    transition: border-color 0.2s;
    background: white;
}

.ops-ai-idea:focus {
    border-color: var(--primary);
}

.ops-ai-generate {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.ops-ai-result-panel {
    flex: 1;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    min-height: 480px;
    min-width: 0;
}

.ops-ai-result-empty {
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ops-ai-result-empty-icon {
    font-size: 36px;
    color: var(--primary);
    opacity: 0.35;
    margin-bottom: 16px;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.ops-ai-result-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ops-ai-result-empty-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* 方案结果 */
.ops-plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.ops-plan-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ops-plan-source {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-page);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 10px;
    vertical-align: 2px;
}

.ops-plan-source.ai {
    color: var(--success);
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.ai-test-result {
    font-size: 12px;
    margin-left: 10px;
    color: var(--text-muted);
}

.ai-test-result.ok {
    color: var(--success);
    font-weight: 500;
}

.ai-test-result.fail {
    color: var(--danger);
    font-weight: 500;
}

.ops-plan-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ops-plan-iter {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-bg);
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.ops-plan-adapter {
    font-size: 12px;
    line-height: 1.7;
    color: var(--primary-dark);
    background: var(--primary-bg);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 14px;
}

.ops-plan-strategy {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.ops-plan-strategy-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 10px;
    border-radius: 10px;
    margin-right: 8px;
    vertical-align: 1px;
}

.ops-plan-block {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.ops-plan-block-h {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.ops-plan-block-body {
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.ops-plan-block-body ul {
    margin: 4px 0 4px 20px;
}

.ops-plan-block-body li {
    margin-bottom: 4px;
}

.ops-plan-block-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.ops-plan-block-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
}

.ops-plan-block-body th,
.ops-plan-block-body td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
    line-height: 1.6;
}

.ops-plan-block-body th {
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-weight: 600;
    white-space: nowrap;
}

.ops-plan-idea {
    background: #fffbeb;
    border-color: #fde68a;
}

.ops-plan-idea .ops-plan-block-h {
    color: var(--warning);
    border-bottom-color: #fde68a;
}

.ops-plan-copy {
    background: white;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 8px 0;
}

/* 深度求索区 */
.ops-plan-deepen {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px dashed var(--border);
}

.ops-plan-deepen-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.ops-plan-deepen-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ops-plan-deepen-row input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.ops-plan-deepen-row input:focus {
    border-color: var(--primary);
}

.ops-plan-deepen-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.ops-plan-deepen-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ops-deepen-chip {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.ops-deepen-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

/* 生成历史 */
.ops-history-empty {
    background: white;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 48px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.ops-history-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.ops-history-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.ops-history-main {
    min-width: 0;
}

.ops-history-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ops-history-sys {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: 1px;
}

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

.ops-history-actions {
    flex-shrink: 0;
}

/* 运营中心响应式 */
@media (max-width: 1280px) {
    .ops-systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .ops-ai-layout {
        flex-direction: column;
    }
    .ops-ai-form-panel {
        width: 100%;
        position: static;
    }
    .ops-wb-library-layout {
        flex-direction: column;
    }
    .ops-wb-modnav {
        width: 100%;
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 4px;
    }
    .ops-wb-mod-item {
        min-width: 180px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    .ops-wb-mod-item.active {
        border-bottom-color: var(--primary);
    }
}

@media (max-width: 768px) {
    .ops-systems-grid {
        grid-template-columns: 1fr;
    }
    .ops-profile-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .ops-plan-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

