/* 合同审查专用样式 */

/* 审查区域 */
.review-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 输入区域 */
.review-input-area {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.review-input-area h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1f2937;
}

.review-input-area p {
    color: #6b7280;
    margin-bottom: 20px;
}

.review-textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.review-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.review-actions-top {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.file-hint {
    color: #9ca3af;
    font-size: 13px;
}

/* 审查选项 */
.review-options {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.review-option-group {
    margin-bottom: 20px;
}

.review-option-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    font-size: 15px;
}

.optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
}

.review-purpose-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.review-purpose-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 审核要求 */
.review-strictness {
    display: flex;
    gap: 12px;
}

.strictness-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.strictness-option:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.strictness-option input {
    display: none;
}

.strictness-option input:checked + .strictness-label {
    color: #667eea;
}

.strictness-option input:checked ~ .strictness-desc {
    color: #667eea;
}

.strictness-option:has(input:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.strictness-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.strictness-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

/* 结果区域 */
.review-result-area {
    display: none;
}

/* 顶部工具栏 */
.review-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.review-stats-text {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

/* 双栏布局 */
.review-columns {
    display: flex;
    gap: 0;
    min-height: 700px;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
}

/* 左侧：Quill编辑器面板 */
.review-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.quill-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 16px;
}

.review-quill-editor {
    flex: 1;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.8;
}

.review-quill-editor .ql-editor {
    padding: 30px 40px;
    min-height: 600px;
}

.review-quill-editor h1 {
    font-family: 黑体, SimHei, sans-serif;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
}

.review-quill-editor h2 {
    font-family: 黑体, SimHei, sans-serif;
    font-size: 16px;
    font-weight: bold;
    margin-top: 16px;
}

.review-quill-editor p {
    text-indent: 2em;
    margin: 6px 0;
}

/* 高亮问题文本 */
.review-highlight {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
    border-bottom: 2px solid #f59e0b;
}

.review-highlight:hover {
    background: #fde047;
}

.review-highlight.accepted {
    background: #dcfce7;
    border-bottom-color: #22c55e;
}

/* 右侧：建议面板 */
.review-suggestions-panel {
    width: 320px;
    background: white;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

/* Tab切换 */
.suggestion-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.suggestion-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.suggestion-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.suggestion-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.suggestion-tab .tab-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    background: #e5e7eb;
}

.suggestion-tab.active .tab-count {
    background: #667eea;
    color: white;
}

/* 核心诉求评估 */
.purpose-eval {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.purpose-eval-title {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.purpose-eval-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.purpose-eval-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.purpose-eval-status.yes {
    background: #dcfce7;
    color: #16a34a;
}

.purpose-eval-status.partial {
    background: #fef3c7;
    color: #d97706;
}

.purpose-eval-status.no {
    background: #fee2e2;
    color: #dc2626;
}

.review-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-accept-all {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-accept-all:hover {
    background: #5a67d8;
}

.review-suggestions-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* 建议卡片 */
.suggestion-card {
    background: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #e5e7eb;
    cursor: pointer;
}

.suggestion-card:hover {
    background: #f3f4f6;
}

.suggestion-card.high {
    border-left-color: #ef4444;
}

.suggestion-card.medium {
    border-left-color: #f59e0b;
}

.suggestion-card.low {
    border-left-color: #22c55e;
}

.suggestion-card.processed {
    opacity: 0.6;
}

.suggestion-card.active {
    box-shadow: 0 0 0 2px #667eea;
}

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

.risk-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.risk-tag.risk-high {
    background: #fee2e2;
    color: #dc2626;
}

.risk-tag.risk-medium {
    background: #fef3c7;
    color: #d97706;
}

.risk-tag.risk-low {
    background: #dcfce7;
    color: #16a34a;
}

.suggestion-idx {
    color: #9ca3af;
    font-size: 11px;
}

.suggestion-body {
    margin-bottom: 10px;
}

.suggestion-row {
    margin-bottom: 6px;
}

.suggestion-label {
    color: #6b7280;
    font-size: 11px;
    display: block;
    margin-bottom: 2px;
}

.suggestion-old {
    color: #dc2626;
    text-decoration: line-through;
    font-size: 12px;
    display: block;
    background: #fef2f2;
    padding: 3px 6px;
    border-radius: 3px;
}

.suggestion-new {
    color: #16a34a;
    font-size: 12px;
    display: block;
    background: #f0fdf4;
    padding: 3px 6px;
    border-radius: 3px;
}

.suggestion-reason {
    color: #6b7280;
    font-size: 11px;
    font-style: italic;
    margin-top: 6px;
}

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

.sug-btn {
    flex: 1;
    padding: 5px 8px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sug-btn:hover {
    opacity: 0.8;
}

.sug-accept {
    background: #16a34a;
    color: white;
}

.sug-edit {
    background: #3b82f6;
    color: white;
}

.sug-ignore {
    background: #e5e7eb;
    color: #4b5563;
}

.suggestion-status {
    text-align: center;
    padding: 5px;
    font-size: 11px;
    border-radius: 3px;
}

.status-accepted {
    background: #dcfce7;
    color: #16a34a;
}

.status-modified {
    background: #dbeafe;
    color: #2563eb;
}

.status-ignored {
    background: #f3f4f6;
    color: #6b7280;
}

/* 条款库/法律检索面板 */
#clause-panel,
#law-panel,
#edit-modal {
    backdrop-filter: blur(4px);
}

.clause-item:hover {
    border-color: #667eea !important;
    background: #f0f4ff !important;
}

/* 修改弹窗 */
.edit-modal-content {
    width: 500px;
}

.edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.edit-textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 响应式 */
@media (max-width: 1100px) {
    .review-suggestions-panel {
        width: 280px;
    }
    
    .review-strictness {
        flex-direction: column;
    }
}

@media (max-width: 800px) {
    .review-columns {
        flex-direction: column;
    }
    
    .review-suggestions-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        max-height: 300px;
    }
    
    .review-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .toolbar-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}
