/* ========================================
   AI关系抽取工具 - 主容器
   ======================================== */
.are-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* 全屏模式 */
.are-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========================================
   顶部工具栏
   ======================================== */
.are-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(124,58,237,0.35);
    flex-shrink: 0;
}

.are-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.are-toolbar .toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.are-toolbar .toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 10px;
    margin-left: 4px;
}

.are-toolbar .toolbar-group.toolbar-center {
    flex: 1;
    justify-content: center;
}

.are-toolbar .toolbar-btn {
    padding: 5px 11px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #7c3aed;
    transition: all 0.2s;
    white-space: nowrap;
}

.are-toolbar .toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.are-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

/* ========================================
   主内容区 - 三列布局
   ======================================== */
.are-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   左侧：输入面板
   ======================================== */
.are-input-panel {
    width: 280px;
    min-width: 230px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   中间：结果面板
   ======================================== */
.are-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
    min-width: 0;
    border-right: 1px solid #e2e8f0;
}

/* ========================================
   右侧：关系图谱面板
   ======================================== */
.are-graph-panel {
    width: 340px;
    min-width: 280px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   面板通用 - 头部
   ======================================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 10px 16px;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    border-left: 3px solid #7c3aed;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0;
    margin-left: -3px;
}

.panel-header .header-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.action-btn {
    padding: 3px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #7c3aed;
}

/* 字符数徽章 */
.char-count-badge {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.char-count-badge.over-limit {
    color: #ef4444;
    font-weight: 600;
}

/* ========================================
   左侧输入面板内容
   ======================================== */
.are-input-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group .label-hint {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-textarea.text-area {
    min-height: 120px;
}

/* 标签选择组 */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-btn {
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tag-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
}

.tag-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

/* 滑块行 */
.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.are-slider {
    flex: 1;
    accent-color: #7c3aed;
    cursor: pointer;
}

.slider-val {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
}

/* 抽取按钮 */
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    flex-wrap: wrap;
}

.btn-extract {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
    min-width: 0;
}

.btn-extract:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.45);
}

.btn-extract:active:not(:disabled) {
    transform: translateY(0);
}

.btn-extract:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
    50%       { box-shadow: 0 0 0 7px rgba(124,58,237,0.18); }
}

.btn-extract.extracting {
    animation: btnPulse 1.4s ease-in-out infinite;
    cursor: wait;
}

/* 取消按钮 */
.btn-cancel {
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-cancel:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.shortcut-hint {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

/* ========================================
   历史记录面板
   ======================================== */
.are-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.are-history-header:hover {
    background: #f1f5f9;
}

.are-history-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

.are-history-toggle-icon {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
}

.are-history-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 2px;
}

.clear-history-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
}

.clear-history-btn:hover {
    background: #fef2f2;
}

.are-history-list {
    overflow-y: auto;
    padding: 6px 8px;
    max-height: 320px;
    min-height: 40px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

/* 历史记录折叠状态 */
.are-history-list.collapsed {
    max-height: 0;
    padding: 0 8px;
    opacity: 0;
    overflow: hidden;
    min-height: 0;
}

.history-item {
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    margin-bottom: 5px;
    background: #f8fafc;
    transition: all 0.2s;
    font-size: 12px;
    position: relative;
}

.history-item:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}

.history-item-title {
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    padding-right: 18px;
}

.history-item-meta {
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
}

.history-item-del {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 13px;
    padding: 0 3px;
    border-radius: 3px;
    transition: color 0.2s;
    line-height: 1;
}

.history-item-del:hover {
    color: #ef4444;
}

.history-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 14px 0;
}

/* 结果 Tab 徽章 */
.tab-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    background: #7c3aed;
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    margin-left: 4px;
    vertical-align: middle;
    transition: all 0.3s;
}

.result-tab:not(.active) .tab-badge {
    background: #94a3b8;
}

/* 结果标签页 */
.result-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 12px;
    gap: 2px;
    flex-shrink: 0;
}

.result-tab {
    padding: 8px 14px;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.result-tab:hover {
    color: #6d28d9;
}

.result-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    font-weight: 600;
}

/* 结果内容区 */
.result-content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 空状态 */
.output-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 24px;
    text-align: center;
    gap: 12px;
    color: #94a3b8;
}

.output-empty-state .empty-icon {
    font-size: 48px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.output-empty-state .empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.output-empty-state .empty-desc {
    font-size: 13px;
    color: #94a3b8;
    max-width: 300px;
    line-height: 1.6;
}

.output-empty-state .empty-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.tip-item {
    font-size: 12px;
    color: #a78bfa;
    background: #f5f3ff;
    padding: 4px 12px;
    border-radius: 4px;
}

/* 骨架屏 */
.skeleton-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line,
.skeleton-block {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
}

.skeleton-block {
    border-radius: 6px;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* 错误状态 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 24px;
    text-align: center;
    gap: 12px;
}

.error-state .error-icon {
    font-size: 40px;
}

.error-state .error-msg {
    font-size: 13px;
    color: #ef4444;
    max-width: 300px;
    line-height: 1.5;
}

.retry-btn {
    padding: 7px 20px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: #6d28d9;
}

/* 三元组列表 */
.triples-container,
.entities-container,
.summary-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 4px solid #7c3aed;
}

.entities-container {
    border-left-color: #0ea5e9;
}

.summary-container {
    border-left-color: #22c55e;
}

.triples-count,
.entities-count {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
    font-weight: 500;
}

.triples-count strong,
.entities-count strong {
    color: #7c3aed;
}

.triples-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.triple-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}

.triple-row:hover {
    border-color: #a78bfa;
    background: #faf5ff;
}

.triple-index {
    font-size: 11px;
    color: #94a3b8;
    min-width: 16px;
    text-align: right;
}

.entity-tag {
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    white-space: nowrap;
}

.predicate-tag {
    padding: 3px 9px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 12px;
    color: #475569;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.triple-arrow {
    color: #a78bfa;
    font-size: 14px;
    font-weight: bold;
}

/* 实体表格 */
.entities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.entities-table thead tr {
    background: #f5f3ff;
}

.entities-table th {
    padding: 8px 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
    border-bottom: 2px solid #ede9fe;
}

.entities-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.entities-table tr:hover td {
    background: #faf5ff;
}

.entity-name {
    font-weight: 600;
    color: #334155;
}

.type-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.entity-desc {
    color: #94a3b8;
    font-size: 12px;
}

/* 摘要统计 */
.summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 8px;
}

.summary-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.7;
    background: #faf5ff;
    border-left: 3px solid #7c3aed;
    padding: 12px 14px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
}

.stats-grid {
    display: flex;
    gap: 12px;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: #f5f3ff;
    border-radius: 8px;
    border: 1px solid #ede9fe;
}

.stat-val {
    font-size: 26px;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}


/* ========================================
   图谱 Loading 动画
   ======================================== */
@keyframes graphLoadingPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.15); }
}

@keyframes loadingDot {
    0%, 80%, 100% { opacity: 0.2; }
    40%            { opacity: 1; }
}

.graph-loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.graph-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c3aed;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.graph-loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.graph-loading-dots span:nth-child(3) { animation-delay: 0.32s; }

.ph-icon.loading {
    animation: graphLoadingPulse 1.2s ease-in-out infinite;
}

/* ========================================
   右侧图谱面板
   ======================================== */
.graph-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

#graphCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    display: block;
}

#graphCanvas:active {
    cursor: grabbing;
}

.graph-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    pointer-events: none;
}

.graph-placeholder .ph-icon {
    font-size: 40px;
    opacity: 0.4;
}

.graph-placeholder .ph-text {
    font-size: 13px;
    color: #94a3b8;
}

.graph-placeholder .ph-tips {
    font-size: 11px;
    color: #cbd5e1;
}

/* 图谱操控按钮 */
.graph-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.graph-ctrl-btn {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.96);
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    line-height: 1;
}

.graph-ctrl-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

/* 节点悬浮提示 */
.graph-tooltip {
    position: absolute;
    background: rgba(30, 30, 46, 0.92);
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 20;
    max-width: 200px;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* 图例 */
.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 8px 12px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 11px;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================
   示例抽屉
   ======================================== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

.example-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.12);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.example-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #fff;
    flex-shrink: 0;
}

.drawer-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.drawer-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255,255,255,0.35);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-card {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.example-card:hover {
    border-color: #7c3aed;
    background: #faf5ff;
    transform: translateX(3px);
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.example-card-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: #7c3aed;
    color: #fff;
    border-radius: 8px;
}

.example-card-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
    line-height: 1.5;
}

.example-card-preview {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ========================================
   Toast 提示
   ======================================== */
.are-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(124,58,237,0.92);
    color: #fff;
    padding: 9px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}

.are-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.are-toast.warn {
    background: rgba(245,158,11,0.92);
    box-shadow: 0 4px 14px rgba(245,158,11,0.4);
}

.are-toast.error {
    background: rgba(239,68,68,0.92);
    box-shadow: 0 4px 14px rgba(239,68,68,0.4);
}

/* ========================================
   滚动条样式
   ======================================== */
.are-input-panel .panel-body::-webkit-scrollbar,
.are-history-list::-webkit-scrollbar,
.result-content-area::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar,
.triples-container::-webkit-scrollbar,
.entities-container::-webkit-scrollbar,
.summary-container::-webkit-scrollbar {
    width: 5px;
}

.are-input-panel .panel-body::-webkit-scrollbar-track,
.are-history-list::-webkit-scrollbar-track,
.result-content-area::-webkit-scrollbar-track,
.triples-container::-webkit-scrollbar-track,
.entities-container::-webkit-scrollbar-track {
    background: transparent;
}

.are-input-panel .panel-body::-webkit-scrollbar-thumb,
.are-history-list::-webkit-scrollbar-thumb,
.result-content-area::-webkit-scrollbar-thumb,
.triples-container::-webkit-scrollbar-thumb,
.entities-container::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

.are-input-panel .panel-body::-webkit-scrollbar-thumb:hover,
.result-content-area::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* ========================================
   统一空状态提示（.sa-empty-hint）
   ======================================== */
.sa-empty-hint {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    padding: 40px 20px;
    line-height: 1.6;
}

/* Tab徽章 - 内容为空时自动隐藏 */
.tab-badge:empty {
    display: none;
}

/* ========================================
   统计卡片增强
   ======================================== */
.stat-item {
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.12);
    cursor: default;
}

/* ========================================
   图谱容器微妙点阵背景
   ======================================== */
.graph-container {
    background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
    background-size: 22px 22px;
}

/* ========================================
   抽屉滚动条补全
   ======================================== */
.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* summary 容器滚动条 */
.summary-container::-webkit-scrollbar-track {
    background: transparent;
}

.summary-container::-webkit-scrollbar-thumb {
    background: rgba(34,197,94,0.3);
    border-radius: 3px;
}

.summary-container::-webkit-scrollbar-thumb:hover {
    background: rgba(34,197,94,0.6);
}
