/* 知音 · 艺学堂AI经营系统 - AI深度融合样式 */
/* 版本：v1.0 | 覆盖：记忆体、草稿、看板工作台、侦探发现、教练 */

/* ===================== AI工作台（看板） ===================== */

.ai-workbench-section {
    margin-top: 24px;
    border-top: 2px solid var(--gray-light);
    padding-top: 16px;
}

.ai-workbench-loading {
    text-align: center;
    padding: 32px;
    color: var(--gray);
    font-size: 14px;
}

.ai-workbench {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.ai-workbench-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid var(--gray-light);
}

.ai-workbench-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.ai-workbench-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.ai-workbench-actions {
    display: flex;
    gap: 8px;
}

.ai-workbench-body {
    padding: 16px 20px;
}

/* 今日微辅导提示 */
.ai-coach-tip {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ai-coach-tip-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-coach-tip-body {
    flex: 1;
}

.ai-coach-tip-title {
    font-weight: 600;
    font-size: 14px;
    color: #856404;
    margin-bottom: 4px;
}

.ai-coach-tip-content {
    font-size: 13px;
    color: #6d5200;
    line-height: 1.5;
}

/* 侦探发现提醒 */
.ai-detective-alert {
    margin-bottom: 16px;
}

.ai-detective-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ai-detective-alert-item:hover {
    opacity: 0.85;
}

.ai-detective-alert-item.ai-alert-high {
    background: #fde8e8;
    border-left: 3px solid #dc3545;
    color: #721c24;
}

.ai-detective-alert-item.ai-alert-medium {
    background: #fff3e0;
    border-left: 3px solid #fd7e14;
    color: #7a4a00;
}

.ai-detective-alert-item.ai-alert-low {
    background: #e0f7fb;
    border-left: 3px solid #149ebb;
    color: #004085;
}

.ai-detective-alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.ai-detective-alert-text {
    flex: 1;
}

.ai-detective-alert-count {
    font-weight: 600;
}

/* 今日任务列表 */
.ai-today-tasks {
    margin-bottom: 16px;
}

.ai-task-priority-p1 {
    border-left: 3px solid #dc3545;
}

.ai-task-priority-p2 {
    border-left: 3px solid #fd7e14;
}

.ai-task-priority-p3 {
    border-left: 3px solid #149ebb;
}

.ai-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: var(--light);
    transition: background 0.2s;
}

.ai-task-item:hover {
    background: #e9ecef;
}

.ai-task-item.ai-task-done {
    opacity: 0.5;
    text-decoration: line-through;
}

.ai-task-icon {
    font-size: 14px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.ai-task-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.ai-task-title {
    font-weight: 500;
}

.ai-task-entity {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

.ai-task-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ai-task-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ai-task-btn:hover {
    background: #e9ecef;
    border-color: #bbb;
}

.ai-task-btn-dismiss:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.ai-tasks-empty {
    text-align: center;
    padding: 24px;
    color: var(--gray);
    font-size: 13px;
}

/* 教练报告区域 */
.ai-coach-report {
    background: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
}

.ai-coach-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ai-coach-report-header h4 {
    font-size: 14px;
    color: #004085;
    margin: 0;
}

.ai-coach-report-header h4 i {
    margin-right: 6px;
}

.ai-coach-report-content {
    font-size: 13px;
    color: #004085;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ===================== AI记忆体时间线 ===================== */

.ai-memory-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 12px;
    margin-bottom: 16px;
}

.ai-memory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ai-memory-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.ai-memory-header h3 i {
    color: #6f42c1;
    margin-right: 6px;
}

.ai-memory-count {
    display: inline-block;
    background: #6f42c1;
    color: var(--white);
    border-radius: 10px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 18px;
    margin-left: 4px;
    vertical-align: middle;
}

.ai-memory-actions {
    display: flex;
    gap: 6px;
}

.ai-memory-loading {
    text-align: center;
    padding: 24px;
    color: var(--gray);
    font-size: 13px;
}

.ai-memory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-light);
}

.ai-memory-filter {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #ddd;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
}

.ai-memory-filter.active {
    background: #6f42c1;
    color: var(--white);
    border-color: #6f42c1;
}

.ai-memory-filter:hover:not(.active) {
    border-color: #6f42c1;
    color: #6f42c1;
}

.ai-memory-list {
    max-height: 400px;
    overflow-y: auto;
}

.ai-memory-empty {
    text-align: center;
    padding: 24px;
    color: var(--gray);
}

.ai-memory-empty-icon {
    font-size: 32px;
    opacity: 0.3;
    margin-bottom: 8px;
}

.ai-memory-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.ai-memory-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.ai-memory-item:last-child {
    border-bottom: none;
}

.ai-memory-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.ai-memory-body {
    flex: 1;
    min-width: 0;
}

.ai-memory-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.ai-memory-category {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f0f0f0;
}

.ai-memory-confidence {
    font-size: 11px;
    color: #ffc107;
}

.ai-memory-time {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

.ai-memory-content {
    font-size: 13px;
    color: var(--dark);
    line-height: 1.5;
    word-break: break-word;
}

.ai-memory-actions-row {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.ai-memory-btn-sm {
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
    color: var(--gray);
    transition: all 0.15s;
}

.ai-memory-btn-sm:hover {
    background: #f0f0f0;
    color: var(--dark);
}

.ai-memory-btn-danger:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* ===================== AI内容草稿 ===================== */

.ai-draft-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 12px;
    margin-bottom: 16px;
}

.ai-draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ai-draft-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.ai-draft-header h3 i {
    color: var(--primary);
    margin-right: 6px;
}

.ai-draft-actions {
    display: flex;
    gap: 6px;
}

.ai-draft-loading {
    text-align: center;
    padding: 24px;
    color: var(--gray);
    font-size: 13px;
}

.ai-draft-empty {
    text-align: center;
    padding: 24px;
    color: var(--gray);
}

.ai-draft-empty-icon {
    font-size: 32px;
    opacity: 0.3;
    margin-bottom: 8px;
}

.ai-draft-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.ai-draft-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.ai-draft-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ai-draft-card.status-active {
    border-color: #ffc107;
}

.ai-draft-card.status-confirmed {
    border-color: #28a745;
}

.ai-draft-card.status-revoked {
    border-color: #dc3545;
    opacity: 0.7;
}

.ai-draft-card.status-modified {
    border-color: #17a2b8;
}

.ai-draft-card.status-expired {
    border-color: #6c757d;
    opacity: 0.7;
}

.ai-draft-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.ai-draft-status {
    font-size: 12px;
    font-weight: 600;
}

.ai-draft-status.status-active {
    color: #856404;
}

.ai-draft-status.status-confirmed {
    color: #155724;
}

.ai-draft-status.status-revoked {
    color: #721c24;
}

.ai-draft-status.status-modified {
    color: #004085;
}

.ai-draft-status.status-expired {
    color: #6c757d;
}

.ai-draft-expires {
    font-size: 11px;
    color: #856404;
    margin-left: auto;
}

.ai-draft-expired-tag {
    font-size: 11px;
    color: #6c757d;
    margin-left: auto;
}

.ai-draft-time {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

.ai-draft-card-body {
    padding: 12px;
}

.ai-draft-content-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--dark);
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-draft-content-json {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-draft-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

.ai-draft-field-label {
    font-weight: 600;
    color: var(--gray);
    min-width: 70px;
    flex-shrink: 0;
}

.ai-draft-field-value {
    color: var(--dark);
    word-break: break-word;
}

.ai-draft-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.ai-draft-meta {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

/* ===================== AI侦探发现（续费页） ===================== */

.renewal-ai-findings {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    overflow: hidden;
}

.ai-findings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    border-bottom: 1px solid var(--gray-light);
}

.ai-findings-header:hover {
    background: #f8f9fa;
}

.ai-findings-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.ai-findings-header h3 i {
    color: var(--secondary);
    margin-right: 6px;
}

.ai-findings-toggle {
    color: var(--gray);
    font-size: 14px;
}

.ai-findings-body {
    padding: 12px 16px;
}

.ai-findings-empty {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 13px;
}

.ai-finding-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: box-shadow 0.15s;
}

.ai-finding-item:last-child {
    margin-bottom: 0;
}

.ai-finding-item:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.ai-finding-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ai-finding-type {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 4px;
}

.ai-finding-dimension {
    font-size: 12px;
    color: var(--gray);
}

.ai-finding-time {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

.ai-finding-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.ai-finding-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 6px;
}

.ai-finding-recommend {
    font-size: 12px;
    color: var(--secondary);
    padding: 6px 8px;
    background: #e0f7fb;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ai-finding-recommend i {
    margin-right: 4px;
}

.ai-finding-actions {
    display: flex;
    gap: 6px;
}

/* ===================== 响应式适配 ===================== */

@media (max-width: 768px) {
    .ai-workbench-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .ai-memory-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .ai-memory-filter {
        white-space: nowrap;
    }

    .ai-finding-header {
        flex-wrap: wrap;
    }

    .ai-finding-time {
        margin-left: 0;
        width: 100%;
    }
}

/* ===================== AI模拟器面板 ===================== */

.ai-sim-type-btn.selected {
    border-color: var(--primary) !important;
    background: #f0f7ff !important;
}

.ai-sim-type-btn i {
    display: block;
    margin-bottom: 4px;
}

.ai-sim-params-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.ai-sim-result-scenarios {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.ai-sim-scenario-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 12px;
    transition: box-shadow 0.2s;
}

.ai-sim-scenario-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.ai-sim-feedback-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ai-sim-feedback-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    transition: all 0.15s;
}

.ai-sim-feedback-btn:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

/* ===================== AI质检Badge ===================== */

.ai-quality-badge-container {
    display: inline-flex;
    align-items: center;
}

.ai-quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ai-quality-badge:hover {
    opacity: 0.85;
}

.ai-quality-issues {
    margin-top: 8px;
}

.ai-quality-issue {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.ai-quality-issue:last-child {
    border-bottom: none;
}

.ai-quality-issue-critical {
    color: #dc3545;
}

.ai-quality-issue-major {
    color: #fd7e14;
}

.ai-quality-issue-minor {
    color: #6c757d;
}

/* ===================== AI工作台独立页面 ===================== */

.ai-wb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.ai-metric-card {
    text-align: center;
    padding: 16px;
    border-radius: 10px;
    transition: transform 0.2s;
}

.ai-metric-card:hover {
    transform: translateY(-2px);
}

.ai-metric-value {
    font-size: 28px;
    font-weight: 700;
}

.ai-metric-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.ai-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.ai-section-title i {
    margin-right: 8px;
}
