/* ==========================================================================
   Ontology Action Panel (M12)
   --------------------------------------------------------------------------
   action-panel.js 动态创建 DOM，使用自定义类 + 少量 Bootstrap 风格类。
   本应用基于 Tailwind（无 Bootstrap），因此这里为该面板补齐全部样式。
   所有选择器都限定在 .ontology-action-panel 作用域内，避免污染全局。
   布局与 version-panel 等兄弟面板一致：右侧固定抽屉（420px 宽）。
   ========================================================================== */

/* ---- 容器：右侧固定抽屉 ---- */
.ontology-action-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 420px;
    max-width: 95vw;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 380;
    display: block; /* JS 通过内联 display:block/none 控制显隐 */
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
}
.dark .ontology-action-panel {
    background: #0f172a;
    border-left-color: #334155;
    color: #e2e8f0;
}

/* 最小化：只保留头部 */
.ontology-action-panel.minimized {
    height: auto;
}
.ontology-action-panel.minimized .action-panel-content {
    display: none;
}

/* ---- 头部 ---- */
.ontology-action-panel .action-panel-header {
    height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.dark .ontology-action-panel .action-panel-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: #334155;
}
.ontology-action-panel .action-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.ontology-action-panel .action-panel-header h3 i {
    color: #a855f7; /* 紫色，呼应入口按钮 */
}
.ontology-action-panel .action-panel-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- 内容区 ---- */
.ontology-action-panel .action-panel-content {
    height: calc(100% - 56px);
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}

/* ---- 列表视图 ---- */
.ontology-action-panel .action-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ontology-action-panel .action-list-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.ontology-action-panel .action-count {
    font-size: 12px;
    color: #94a3b8;
}
.ontology-action-panel .action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ontology-action-panel .action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dark .ontology-action-panel .action-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: #334155;
}
.ontology-action-panel .action-item:hover {
    border-color: #a855f7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ontology-action-panel .action-item.disabled {
    opacity: .5;
}
.ontology-action-panel .action-item-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 15px;
}
.dark .ontology-action-panel .action-item-icon {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}
.ontology-action-panel .action-item-content {
    flex: 1 1 auto;
    min-width: 0;
}
.ontology-action-panel .action-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.dark .ontology-action-panel .action-item-name {
    color: #e2e8f0;
}
.ontology-action-panel .action-item-desc {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .ontology-action-panel .action-item-desc {
    color: #94a3b8;
}
.ontology-action-panel .action-item-actions {
    flex: 0 0 auto;
}

/* ---- 表单视图 ---- */
.ontology-action-panel .action-form-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.ontology-action-panel .action-form-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1 1 auto;
}
.ontology-action-panel .action-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.ontology-action-panel .action-badge.builtin {
    background: #EDFDF3;
    color: #1C6B3B;
}
.dark .ontology-action-panel .action-badge.builtin {
    background: rgba(53, 168, 91, 0.15);
    color: #74E9A4;
}
.ontology-action-panel .action-badge.custom {
    background: #f3e8ff;
    color: #7c3aed;
}
.dark .ontology-action-panel .action-badge.custom {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}
.ontology-action-panel .action-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
}
.dark .ontology-action-panel .action-description {
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
}
.ontology-action-panel .action-description p {
    margin: 6px 0 0;
}

/* ---- 表单元素（Bootstrap 风格类的 Tailwind 化）---- */
.ontology-action-panel .form-group {
    margin-bottom: 14px;
}
.ontology-action-panel .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.dark .ontology-action-panel .form-group label {
    color: #94a3b8;
}
.ontology-action-panel .required {
    color: #e11d48;
    margin-left: 2px;
}
.ontology-action-panel .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ontology-action-panel .form-control:focus {
    outline: none;
    border-color: #35A85B;
    box-shadow: 0 0 0 3px rgba(53, 168, 91, 0.15);
}
.dark .ontology-action-panel .form-control {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
.ontology-action-panel textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

/* ---- 按钮 ---- */
.ontology-action-panel .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: inherit;
    transition: background-color .15s ease, color .15s ease;
}
.ontology-action-panel .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}
.ontology-action-panel .btn-primary {
    background: #35A85B;
    color: #ffffff;
}
.ontology-action-panel .btn-primary:hover {
    background: #228547;
}
.ontology-action-panel .btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.dark .ontology-action-panel .btn-secondary {
    background: #334155;
    color: #e2e8f0;
}
.ontology-action-panel .btn-secondary:hover {
    background: #cbd5e1;
}
.ontology-action-panel .btn-link {
    background: transparent;
    color: #64748b;
    padding: 4px 6px;
}
.ontology-action-panel .btn-link:hover {
    color: #334155;
    background: #f1f5f9;
    border-radius: 6px;
}
.dark .ontology-action-panel .btn-link:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}
.ontology-action-panel .btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}
.ontology-action-panel .action-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ---- 提示框 / 徽章 /  muted ---- */
.ontology-action-panel .alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}
.ontology-action-panel .alert-success {
    background: #EDFDF3;
    color: #1C6B3B;
    border-color: #ABF4C7;
}
.dark .ontology-action-panel .alert-success {
    background: rgba(53, 168, 91, 0.12);
    color: #74E9A4;
    border-color: rgba(53, 168, 91, 0.3);
}
.ontology-action-panel .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.dark .ontology-action-panel .alert-danger {
    background: rgba(225, 29, 72, 0.12);
    color: #fda4af;
    border-color: rgba(225, 29, 72, 0.3);
}
.ontology-action-panel .badge {
    background: #e2e8f0;
    color: #334155;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}
.dark .ontology-action-panel .badge {
    background: #334155;
    color: #e2e8f0;
}
.ontology-action-panel .text-muted {
    color: #94a3b8;
    font-size: 13px;
}

/* ---- dry-run 预览结果 ---- */
.ontology-action-panel .action-dryrun-result {
    margin-top: 16px;
}
.ontology-action-panel .action-dryrun-result h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}
.ontology-action-panel .action-edits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ontology-action-panel .action-edits-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    background: #f8fafc;
    border-radius: 6px;
}
.dark .ontology-action-panel .action-edits-list li {
    background: rgba(255, 255, 255, 0.03);
}
.ontology-action-panel .edit-kind {
    font-weight: 600;
    color: #7c3aed;
}
.ontology-action-panel .edit-operation {
    color: #64748b;
}
.ontology-action-panel .edit-name {
    font-weight: 600;
    color: #1e293b;
}
.dark .ontology-action-panel .edit-name {
    color: #e2e8f0;
}

/* ==========================================================================
   M12-P0: Function-backed Action 编辑器
   ========================================================================== */

.ontology-action-panel .action-list-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ontology-action-panel .action-list-header-actions .action-create-btn {
    padding: 4px 10px;
    font-size: 12px;
}
.ontology-action-panel .action-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ontology-action-panel .action-edit-btn {
    background: #e2e8f0;
    color: #334155;
}
.dark .ontology-action-panel .action-edit-btn {
    background: #334155;
    color: #e2e8f0;
}
.ontology-action-panel .action-edit-btn:hover {
    background: #cbd5e1;
}
.ontology-action-panel .action-delete-btn {
    background: #fef2f2;
    color: #b91c1c;
}
.dark .ontology-action-panel .action-delete-btn {
    background: rgba(225, 29, 72, 0.12);
    color: #fda4af;
}
.ontology-action-panel .action-delete-btn:hover {
    background: #fee2e2;
}
.ontology-action-panel .action-function-backed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
}
.dark .ontology-action-panel .action-function-backed-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* ---- 编辑器视图 ---- */
.ontology-action-panel .action-editor-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ontology-action-panel .action-editor-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.ontology-action-panel .action-editor-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1 1 auto;
}
.ontology-action-panel .action-editor-body {
    display: flex;
    flex-direction: column;
}
.ontology-action-panel .action-editor-body .form-group {
    margin-bottom: 12px;
}
.ontology-action-panel .action-editor-json {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', monospace;
    font-size: 12px;
    min-height: 60px;
}
.ontology-action-panel .form-row {
    display: flex;
    gap: 12px;
}
.ontology-action-panel .form-group-half {
    flex: 1 1 50%;
    min-width: 0;
}
.ontology-action-panel .form-group-inline {
    display: flex;
    align-items: center;
}
.ontology-action-panel .form-group-inline label {
    margin-bottom: 0;
}
.ontology-action-panel .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}
.ontology-action-panel .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #35A85B;
}
.ontology-action-panel .form-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}
.dark .ontology-action-panel .form-text {
    color: #94a3b8;
}
.ontology-action-panel .action-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.dark .ontology-action-panel .action-editor-actions {
    border-top-color: #334155;
}

/* ==========================================================================
   M13: Action 历史日志
   ========================================================================== */

/* ---- Tab 标签 ---- */
.ontology-action-panel .action-panel-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 8px;
}
.dark .ontology-action-panel .action-panel-tabs {
    background: #1e293b;
}
.ontology-action-panel .action-panel-tab {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.dark .ontology-action-panel .action-panel-tab {
    color: #94a3b8;
}
.ontology-action-panel .action-panel-tab:hover {
    color: #1e293b;
}
.dark .ontology-action-panel .action-panel-tab:hover {
    color: #e2e8f0;
}
.ontology-action-panel .action-panel-tab.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.dark .ontology-action-panel .action-panel-tab.active {
    background: #334155;
    color: #e2e8f0;
}

/* ---- 历史视图头部 ---- */
.ontology-action-panel .action-history-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ontology-action-panel .action-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ontology-action-panel .action-history-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.ontology-action-panel .action-history-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ontology-action-panel .action-history-controls .btn-danger {
    background: #fef2f2;
    color: #b91c1c;
}
.dark .ontology-action-panel .action-history-controls .btn-danger {
    background: rgba(225, 29, 72, 0.12);
    color: #fda4af;
}
.ontology-action-panel .action-history-controls .btn-danger:hover {
    background: #fee2e2;
}

/* ---- 统计卡片 ---- */
.ontology-action-panel .action-history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ontology-action-panel .action-history-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.dark .ontology-action-panel .action-history-stat {
    background: rgba(255, 255, 255, 0.03);
    border-color: #334155;
}
.ontology-action-panel .action-history-stat.success {
    background: #EDFDF3;
    border-color: #ABF4C7;
}
.dark .ontology-action-panel .action-history-stat.success {
    background: rgba(53, 168, 91, 0.12);
    border-color: rgba(53, 168, 91, 0.3);
}
.ontology-action-panel .action-history-stat.failure {
    background: #fef2f2;
    border-color: #fecaca;
}
.dark .ontology-action-panel .action-history-stat.failure {
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.3);
}
.ontology-action-panel .action-history-stat.dryrun {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.dark .ontology-action-panel .action-history-stat.dryrun {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}
.ontology-action-panel .action-history-stat.rate {
    grid-column: span 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}
.ontology-action-panel .action-history-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}
.dark .ontology-action-panel .action-history-stat-value {
    color: #e2e8f0;
}
.ontology-action-panel .action-history-stat.success .action-history-stat-value {
    color: #1C6B3B;
}
.dark .ontology-action-panel .action-history-stat.success .action-history-stat-value {
    color: #74E9A4;
}
.ontology-action-panel .action-history-stat.failure .action-history-stat-value {
    color: #b91c1c;
}
.dark .ontology-action-panel .action-history-stat.failure .action-history-stat-value {
    color: #fda4af;
}
.ontology-action-panel .action-history-stat.dryrun .action-history-stat-value {
    color: #1d4ed8;
}
.dark .ontology-action-panel .action-history-stat.dryrun .action-history-stat-value {
    color: #93c5fd;
}
.ontology-action-panel .action-history-stat-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.dark .ontology-action-panel .action-history-stat-label {
    color: #94a3b8;
}
.ontology-action-panel .action-history-stat-skeleton {
    background: #e2e8f0;
    border-radius: 10px;
    height: 60px;
    animation: action-history-pulse 1.5s infinite;
}
.dark .ontology-action-panel .action-history-stat-skeleton {
    background: #334155;
}
@keyframes action-history-pulse {
    0% { opacity: 1; }
    50% { opacity: .5; }
    100% { opacity: 1; }
}

/* ---- 过滤器 ---- */
.ontology-action-panel .action-history-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.ontology-action-panel .action-history-filter .btn {
    padding: 4px 10px;
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
}
.dark .ontology-action-panel .action-history-filter .btn {
    background: #1e293b;
    color: #94a3b8;
}
.ontology-action-panel .action-history-filter .btn:hover {
    background: #e2e8f0;
}
.ontology-action-panel .action-history-filter .btn.active {
    background: #35A85B;
    color: #ffffff;
}
.dark .ontology-action-panel .action-history-filter .btn.active {
    background: #35A85B;
    color: #ffffff;
}

/* ---- 列表 ---- */
.ontology-action-panel .action-history-list {
    min-height: 120px;
}
.ontology-action-panel .action-history-loading,
.ontology-action-panel .action-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    color: #94a3b8;
    text-align: center;
}
.ontology-action-panel .action-history-empty i {
    font-size: 28px;
    color: #cbd5e1;
}
.ontology-action-panel .action-history-empty.error {
    color: #b91c1c;
}
.ontology-action-panel .action-history-empty.error i {
    color: #b91c1c;
}
.ontology-action-panel .action-history-count {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.ontology-action-panel .action-history-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ontology-action-panel .action-history-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dark .ontology-action-panel .action-history-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: #334155;
}
.ontology-action-panel .action-history-item:hover {
    border-color: #a855f7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ontology-action-panel .action-history-item.expanded {
    border-color: #a855f7;
}
.ontology-action-panel .action-history-item-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
}
.ontology-action-panel .action-history-item-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 13px;
}
.dark .ontology-action-panel .action-history-item-icon {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}
.ontology-action-panel .action-history-item-content {
    flex: 1 1 auto;
    min-width: 0;
}
.ontology-action-panel .action-history-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.dark .ontology-action-panel .action-history-item-title {
    color: #e2e8f0;
}
.ontology-action-panel .action-history-item-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.ontology-action-panel .action-history-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
}
.ontology-action-panel .action-history-badge.success {
    background: #EDFDF3;
    color: #1C6B3B;
}
.dark .ontology-action-panel .action-history-badge.success {
    background: rgba(53, 168, 91, 0.15);
    color: #74E9A4;
}
.ontology-action-panel .action-history-badge.failure {
    background: #fef2f2;
    color: #b91c1c;
}
.dark .ontology-action-panel .action-history-badge.failure {
    background: rgba(225, 29, 72, 0.15);
    color: #fda4af;
}
.ontology-action-panel .action-history-badge.dryrun {
    background: #eff6ff;
    color: #1d4ed8;
}
.dark .ontology-action-panel .action-history-badge.dryrun {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}
.ontology-action-panel .action-history-badge.version {
    background: #f3e8ff;
    color: #7c3aed;
}
.dark .ontology-action-panel .action-history-badge.version {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}
.ontology-action-panel .action-history-item-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}
.dark .ontology-action-panel .action-history-item-meta {
    color: #94a3b8;
}
.ontology-action-panel .action-history-item-meta i {
    margin-right: 3px;
}
.ontology-action-panel .action-history-item-message {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .ontology-action-panel .action-history-item-message {
    color: #94a3b8;
}
.ontology-action-panel .action-history-item-message.error {
    color: #b91c1c;
    white-space: normal;
}
.dark .ontology-action-panel .action-history-item-message.error {
    color: #fda4af;
}
.ontology-action-panel .action-history-item-toggle {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 12px;
    padding-top: 4px;
}
.ontology-action-panel .action-history-item-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease, padding .2s ease;
    background: #f8fafc;
    border-top: 1px solid transparent;
}
.dark .ontology-action-panel .action-history-item-details {
    background: rgba(255, 255, 255, 0.02);
}
.ontology-action-panel .action-history-item-details.open {
    max-height: 400px;
    border-top-color: #e2e8f0;
}
.dark .ontology-action-panel .action-history-item-details.open {
    border-top-color: #334155;
}
.ontology-action-panel .action-history-detail-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ontology-action-panel .action-history-detail-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    word-break: break-all;
}
.dark .ontology-action-panel .action-history-detail-row {
    color: #94a3b8;
}
.ontology-action-panel .action-history-detail-label {
    flex: 0 0 auto;
    font-weight: 600;
    color: #1e293b;
}
.dark .ontology-action-panel .action-history-detail-label {
    color: #e2e8f0;
}
.ontology-action-panel .action-history-detail-row code {
    background: #e2e8f0;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 11px;
    color: #334155;
}
.dark .ontology-action-panel .action-history-detail-row code {
    background: #1e293b;
    color: #e2e8f0;
}
