/**
 * deriver.css – gemeinsame Styles für kb.php, rule-list.php, rule-editor.php, deriver.php (todo 033)
 * Nach: brv.css, optional admin.css
 */

/* Seitenhintergrund fast schwarz (nur wo diese Datei geladen wird) */
html {
    background: #010409;
}
body {
    background: #010409;
}
::-webkit-scrollbar-track {
    background: #010409;
}

/* ===== Seitenrahmen (ehem. inline style auf .user-list-outer) ===== */
.deriver-page-shell {
    margin-top: 8px;
    padding: 0 12px 30px;
    box-sizing: border-box;
}

.deriver-page-shell--editor {
    margin-top: 8px;
    padding: 0;
    box-sizing: border-box;
}

/* includes/b2b-footer.php: Mindestabstand nach oben (vorher Bootstrap mt-4 ≈ 24px) */
footer.deriver-b2b-footer {
    margin-top: max(30px, 1.5rem);
}

/* ===== kb / Regel-Listen: gleicher Tabellen-Look (war in brv.css für kb ohne admin.css) ===== */
.user-list-outer {
    margin-left: 30px;
    margin-right: 30px;
    max-width: 100%;
    box-sizing: border-box;
}

/* kb.php: Logo links oben – Breite skaliert mit Viewport, optional überschreibbar */
.deriver-kb-page {
    --deriver-kb-logo-width: clamp(1.75rem, 4.5vw, 3.25rem);
}

.deriver-kb-logo-link {
    line-height: 0;
}

.deriver-kb-logo {
    width: var(--deriver-kb-logo-width, 2.25rem);
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

/* kb.php: Logo 6px höher (Höhe); deriver.svg 460×276 → Breite +10px ergibt +6px Höhe bei height:auto */
.deriver-kb-page .deriver-kb-logo {
    width: calc(var(--deriver-kb-logo-width, 2.25rem) + 10px);
}

/* kb.php: „New Knowledge-Base“ – schwarzer Hintergrund */
.deriver-kb-page .btn.deriver-kb-btn-new-kb {
    background-color: #000;
    border: 1px solid #30363d;
    color: #e6edf3;
}
.deriver-kb-page .btn.deriver-kb-btn-new-kb:hover {
    background-color: #161b22;
    border-color: #484f58;
    color: #fff;
}
.deriver-kb-page .btn.deriver-kb-btn-new-kb:focus {
    box-shadow: 0 0 0 0.2rem rgba(110, 118, 129, 0.35);
}

.user-list-outer .table {
    color: #c9d1d9;
}

.user-list-outer .table th {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
    white-space: nowrap;
}

.user-list-outer .table td {
    border-color: #30363d;
}

.user-list-outer .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #0d1117;
}

.user-list-outer .kb-knowledge-table {
    table-layout: auto;
    width: 100%;
}

.user-list-outer .kb-knowledge-table th,
.user-list-outer .kb-knowledge-table td {
    vertical-align: middle;
}

.kb-col-kb-uri,
.kb-col-description {
    word-break: break-word;
}

/* kb.php: erste Spalte (Stift + Ontology + Rules): genug Platz für drei Icon-Buttons */
.user-list-outer .kb-knowledge-table th.kb-col-kb-links,
.user-list-outer .kb-knowledge-table td.kb-col-kb-links {
    width: auto;
    min-width: calc(11rem - 30px);
    max-width: none;
    vertical-align: middle;
    white-space: nowrap;
}
.user-list-outer .kb-knowledge-table td.kb-col-kb-links .deriver-kb-links-cell {
    flex-wrap: nowrap;
    min-width: min-content;
}

/* kb.php: Edit / Ontology / Rules — gleiche quadratische Fläche und Icon-Größe */
.user-list-outer .kb-knowledge-table td.kb-col-kb-links a.deriver-kb-action-icon.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
}
.user-list-outer .kb-knowledge-table td.kb-col-kb-links a.deriver-kb-action-icon.btn-sm > .bi {
    font-size: 1rem;
    line-height: 1;
}

.user-list-outer .kb-knowledge-table th.kb-col-ontology,
.user-list-outer .kb-knowledge-table td.kb-col-ontology,
.user-list-outer .kb-knowledge-table th.kb-col-regeln,
.user-list-outer .kb-knowledge-table td.kb-col-regeln {
    width: auto;
    min-width: 0;
    white-space: nowrap;
}
.user-list-outer .kb-knowledge-table th.kb-col-datetime,
.user-list-outer .kb-knowledge-table td.kb-col-datetime {
    width: auto;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

/* Paginierung: aktive Seite — Hintergrund H1-Farbe (.sg-heading-code-tint #d63384) */
.page-item.active .page-link.bg-secondary {
    background-color: #d63384 !important;
    border-color: #d63384 !important;
    color: #ffffff !important;
}

/* .btn-outline-primary + Checkbox: Rahmen/Hintergrund checked in H1-Farbe #d63384 */
.user-list-outer .btn-outline-primary {
    color: #d63384 !important;
    border-color: #d63384 !important;
}
.user-list-outer .btn-outline-primary:hover {
    background-color: #d63384 !important;
    border-color: #d63384 !important;
    color: #ffffff !important;
}
.user-list-outer .btn-outline-primary:focus,
.user-list-outer .btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.35) !important;
}
.user-list-outer .form-check-input:checked {
    background-color: #d63384 !important;
    border-color: #d63384 !important;
}
.user-list-outer .form-check-input:focus {
    border-color: #d63384 !important;
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25) !important;
}

/* ===== Formular: dunkles Theme (ehem. inline / $inp); todo 036: noch dunkler, Fokus/Autofill (Spezifität > Bootstrap .form-control) ===== */
.form-control.deriver-form-control-dark,
.form-select.deriver-form-control-dark {
    background-color: #0d1117;
    color: #c9d1d9;
    border-color: #30363d;
}
.form-control.deriver-form-control-dark:focus,
.form-control.deriver-form-control-dark:focus-visible,
.form-select.deriver-form-control-dark:focus,
.form-select.deriver-form-control-dark:focus-visible {
    background-color: #0d1117;
    color: #e6edf3;
    border-color: #d63384;
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25);
}
.form-control.deriver-form-control-dark::placeholder {
    color: #6e7681;
}
.form-control.deriver-form-control-dark:disabled,
.form-control.deriver-form-control-dark[readonly]:not([type="date"]),
.form-select.deriver-form-control-dark:disabled {
    background-color: #161b22;
    color: #8b949e;
    opacity: 1;
}
.form-control.deriver-form-control-dark:-webkit-autofill,
.form-control.deriver-form-control-dark:-webkit-autofill:hover,
.form-control.deriver-form-control-dark:-webkit-autofill:focus {
    -webkit-text-fill-color: #c9d1d9;
    box-shadow: 0 0 0 1000px #0d1117 inset;
    transition: background-color 50000s ease-in-out 0s;
}

.deriver-select-kb {
    min-width: 12rem;
    max-width: 22rem;
}

.deriver-rule-list-search {
    min-width: 80px;
    max-width: 100%;
}

/* rule-list.php: kompakte Aktions-Icons mit title-Tooltip (todo 034) */
.rule-list-col-actions {
    white-space: nowrap;
    width: 1%;
    vertical-align: middle;
}
.rule-list-action-icon {
    padding: 0.2rem 0.45rem;
    line-height: 1;
}
/* rule-list.php: Zeile mit Icons — Wrapper flex, Form display:contents (s. Inline-Style in rule-list.php) */
.rule-list-table td.rule-list-col-actions .rule-list-action-row {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.rule-list-table td.rule-list-col-actions form.rule-list-action-form--contents {
    display: contents;
}
.rule-list-table thead th.rule-list-col-v {
    white-space: nowrap;
}

/* todo 036: Tabellenschrift wie Zeile „Seite X von Y …“ (Bootstrap .small = 0.875em) */
.rule-list-table {
    font-size: 0.875em;
}

/*
 * rule-list.php: Sortier-Buttons im thead — ohne diese Regeln können globale
 * .user-list-outer .table th / .table th (Farbe) die .btn-Farben faktisch „fressen“,
 * sodass die Buttons nicht sichtbar sind (Kontrast auf #21262d).
 */
.user-list-outer .rule-list-table thead th.rule-list-sort-th {
    vertical-align: middle;
}
.user-list-outer .rule-list-table thead th a.rule-list-sort-btn {
    color: #e6edf3 !important;
    border: 1px solid #8b949e !important;
    background-color: rgba(240, 246, 252, 0.07) !important;
    min-height: 1.65rem;
    min-width: 2.25rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-weight: 600;
    text-decoration: none !important;
}
.user-list-outer .rule-list-table thead th a.rule-list-sort-btn.btn-outline-primary {
    color: #d63384 !important;
    border-color: #d63384 !important;
    background-color: rgba(214, 51, 132, 0.14) !important;
}
.user-list-outer .rule-list-table thead th a.rule-list-sort-btn.btn-outline-secondary {
    color: #d1d7e0 !important;
    border-color: #6e7681 !important;
    background-color: rgba(240, 246, 252, 0.05) !important;
}
.user-list-outer .rule-list-table thead th a.rule-list-sort-btn:hover {
    color: #f0f6fc !important;
    border-color: #c9d1d9 !important;
    background-color: rgba(240, 246, 252, 0.12) !important;
}
.user-list-outer .rule-list-table thead th a.rule-list-sort-btn.btn-outline-primary:hover {
    color: #f778ba !important;
    border-color: #f778ba !important;
    background-color: rgba(214, 51, 132, 0.22) !important;
}

/* rule-list-editor.php / triple-list-editor: Tabs — Beschriftung wie h1 (.sg-heading-code-tint #d63384); aktiver Tab gefüllt */
.rule-list-editor-tabs.nav-tabs {
    border-bottom-color: #30363d;
}
.rule-list-editor-tabs.nav-tabs .nav-link:not(.active) {
    color: #d63384;
    background-color: #000000;
    border-color: #30363d #30363d transparent;
}
.rule-list-editor-tabs.nav-tabs .nav-link:not(.active):hover {
    color: #f778ba;
    background-color: #161b22;
    border-color: #30363d #30363d #21262d;
}
.rule-list-editor-tabs.nav-tabs .nav-link.active,
.rule-list-editor-tabs.nav-tabs .nav-item .nav-link.active {
    color: #ffffff;
    background-color: #d63384;
    border-color: #d63384 #d63384 #161b22;
}
.rule-list-editor-tabs.nav-tabs .nav-link.active:hover {
    color: #ffffff;
    background-color: #d63384;
    border-color: #d63384 #d63384 #161b22;
}

/* triple-list-editor.php: Tabs Triple / Metadata — ~2/3 Zeilenhöhe (ontology.mdc todo 017) */
.rule-list-editor-card ul.triple-list-editor-tabs.rule-list-editor-tabs .nav-link {
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    line-height: 1.15;
    font-size: 0.875rem;
}

/* ontology.mdc todo 031: Label links (max. 120px), Steuerelement rechts, eine Zeile pro Feld */
.rule-list-editor-card .triple-list-editor-field-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    width: 100%;
}
.rule-list-editor-card .triple-list-editor-field-label {
    flex: 0 0 auto;
    width: 120px;
    max-width: 120px;
    min-width: 0;
    text-align: start;
    line-height: 1.25;
    padding-top: 0.32rem;
    word-break: break-word;
    hyphens: auto;
}
.rule-list-editor-card .triple-list-editor-field-control {
    flex: 1 1 auto;
    min-width: 0;
}

/* triple-list-editor: Enum-Modal — kompaktere Zeilen */
.triple-list-editor-enum-modal .list-group-item {
    min-height: 0;
}

/* triple-list-editor: Prädikat-Dropdown — schmale Spalte: kein Umbruch; Button rechts fix sichtbar */
.rule-list-editor-card .triple-list-editor-p-input-group.input-group {
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}
.rule-list-editor-card .triple-list-editor-p-preset-dropdown {
    flex-shrink: 0;
}
.rule-list-editor-card .input-group .triple-list-editor-p-preset-toggle {
    min-width: 2.5rem;
    height: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c9d1d9;
    border-color: #6e7681;
}
.rule-list-editor-card .input-group .triple-list-editor-p-preset-toggle:hover,
.rule-list-editor-card .input-group .triple-list-editor-p-preset-toggle:focus-visible {
    color: #f0f6fc;
    border-color: #8b949e;
    background-color: rgba(240, 246, 252, 0.08);
}
.rule-list-editor-card .input-group .triple-list-editor-p-preset-toggle i {
    font-size: 1.05rem;
    line-height: 1;
    display: block;
}
.rule-list-editor-card .input-group .triple-list-editor-p-ont-toggle {
    min-width: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c9d1d9;
    border-color: #6e7681;
}
.rule-list-editor-card .input-group .triple-list-editor-p-ont-toggle:hover,
.rule-list-editor-card .input-group .triple-list-editor-p-ont-toggle:focus-visible {
    color: #f0f6fc;
    border-color: #8b949e;
    background-color: rgba(240, 246, 252, 0.08);
}
.rule-list-editor-card .input-group .triple-list-editor-p-ont-toggle i {
    font-size: 1.05rem;
}

/* triple-list-editor: Prädikat-Dropdown (dunkles Menü) */
.rule-list-editor-card .dropdown-menu.bg-dark .dropdown-item.text-light:hover,
.rule-list-editor-card .dropdown-menu.bg-dark .dropdown-item.text-light:focus {
    background-color: rgba(88, 166, 255, 0.2);
    color: #f0f6fc;
}

/* rule-list-editor: Save / Duplicate / Delete — schwarzer Button-Hintergrund (Bootstrap überschreiben) */
.rule-list-editor-card > .card-header .btn {
    background-color: #000000 !important;
    border-width: 1px;
}
.rule-list-editor-card > .card-header .btn-outline-primary {
    border-color: #58a6ff;
    color: #58a6ff;
}
.rule-list-editor-card > .card-header .btn-outline-success {
    border-color: #3fb950;
    color: #3fb950;
}
.rule-list-editor-card > .card-header .btn-outline-danger {
    border-color: #f85149;
    color: #f85149;
}
/* Run → deriver.php (todo 037): gelber Rahmen, nicht wie Primary/Success */
.rule-list-editor-card > .card-header .rule-list-editor-run-btn.btn-outline-warning {
    border-color: #d4a72c;
    color: #e3b341;
    border-width: 2px;
}
.rule-list-editor-card > .card-header .rule-list-editor-run-btn.btn-outline-warning:hover {
    color: #f0b429;
    border-color: #f0b429;
}
.rule-list-editor-card > .card-header .btn:hover {
    background-color: #161b22 !important;
}
.rule-list-editor-card > .card-header .btn:focus,
.rule-list-editor-card > .card-header .btn:focus-visible,
.rule-list-editor-card > .card-header .btn:active {
    background-color: #000000 !important;
    box-shadow: 0 0 0 0.15rem rgba(88, 166, 255, 0.35);
}
.rule-list-editor-card > .card-header .btn-outline-primary:focus,
.rule-list-editor-card > .card-header .btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.15rem rgba(214, 51, 132, 0.45) !important;
}
.rule-list-editor-card > .card-header .btn-outline-primary:hover {
    color: #f778ba;
    border-color: #f778ba;
}
.rule-list-editor-card > .card-header .btn-outline-success:hover {
    color: #56d364;
    border-color: #56d364;
}
.rule-list-editor-card > .card-header .btn-outline-danger:hover {
    color: #ff7b72;
    border-color: #ff7b72;
}
.rule-list-editor-card > .card-header .btn-outline-success:focus,
.rule-list-editor-card > .card-header .btn-outline-success:focus-visible,
.rule-list-editor-card > .card-header .btn-outline-success:active {
    box-shadow: 0 0 0 0.15rem rgba(63, 185, 80, 0.45);
}
.rule-list-editor-card > .card-header .btn-outline-danger:focus,
.rule-list-editor-card > .card-header .btn-outline-danger:focus-visible,
.rule-list-editor-card > .card-header .btn-outline-danger:active {
    box-shadow: 0 0 0 0.15rem rgba(248, 81, 73, 0.45);
}
.rule-list-editor-card > .card-header .rule-list-editor-run-btn:focus,
.rule-list-editor-card > .card-header .rule-list-editor-run-btn:focus-visible,
.rule-list-editor-card > .card-header .rule-list-editor-run-btn:active {
    box-shadow: 0 0 0 0.15rem rgba(212, 167, 44, 0.45);
}

/* rule-list.php: Regeln | Regel-Editor — 2:1 Flex, ziehbare Mitte */
.rule-list-editor-split {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    margin-top: 1.5rem;
    min-height: 0;
    gap: 0;
}
.rule-list-editor-split__left {
    flex: 2 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.rule-list-editor-split__left > .card {
    flex: 1 1 auto;
    min-height: 0;
}
.rule-list-editor-split__resizer {
    flex: 0 0 8px;
    cursor: col-resize;
    background: #30363d;
    border-left: 1px solid #21262d;
    border-right: 1px solid #21262d;
    margin: 0 1px;
    align-self: stretch;
    min-height: 100px;
    touch-action: none;
}
.rule-list-editor-split__resizer:hover,
.rule-list-editor-split__resizer:focus-visible {
    background: #58a6ff;
    outline: none;
}
.rule-list-editor-split__right {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.rule-list-editor-split__right > .rule-list-editor-card {
    flex: 1 1 auto;
    min-height: 0;
}

/* todo 052: Rule-Tab — 2er-Grid (name/rule_code, then/else), niedrigere Textareas */
.rule-list-editor-card .rule-list-editor-compact-ta {
    min-height: 3rem;
    max-height: 12rem;
    resize: vertical;
    line-height: 1.35;
}
.rule-list-editor-card .rule-list-editor-then-else-ta {
    min-height: 5rem;
}
body.rule-list-editor-split--dragging {
    cursor: col-resize !important;
    user-select: none;
}

/* triple-list.php: kein Browser-Body-Rand + Shell füllt Viewport; Grid wächst im Flex */
body.triple-list-page {
    margin: 0;
}
body.triple-list-page .user-list-outer.deriver-page-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 8px);
    padding-bottom: 8px;
    box-sizing: border-box;
}
body.triple-list-page #triple-list-page-layout.triple-list-page-layout {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}
body.triple-list-page .triple-list-page-layout--v1,
body.triple-list-page .triple-list-page-layout--v2 {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* triple-list.php: OQL-Modal (cursor/rules/oql.mdc todo 002 / todo 006) */
.triple-oql-modal .triple-oql-modal-dialog {
    max-width: min(96vw, 1680px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.triple-oql-modal .modal-body {
    max-height: calc(100dvh - 10rem);
}
.triple-oql-modal .triple-oql-grid {
    min-height: min(60vh, 32rem);
}
.triple-oql-modal .triple-oql-query-ta {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.8125rem;
}
.triple-oql-modal .triple-oql-table-wrap,
.triple-oql-modal .triple-oql-matrix-wrap {
    max-height: min(45vh, 26rem);
    overflow: auto;
}
@media (min-width: 1200px) {
    .triple-oql-modal .triple-oql-matrix-aside {
        border-top: none !important;
        padding-top: 0 !important;
        border-left: 1px solid var(--bs-secondary);
        padding-left: 1rem;
    }
}

/* oql-window.php: eigenständiges OQL (cursor/rules/oql.mdc todo 008) */
.oql-window-page .triple-oql-standalone-inner {
    max-width: min(96vw, 1680px);
    margin-left: auto;
    margin-right: auto;
}
.triple-oql-standalone-page .triple-oql-modal-dialog {
    max-width: min(96vw, 1680px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.triple-oql-standalone-page .modal-body {
    max-height: none;
    min-height: min(70vh, 40rem);
}
.triple-oql-standalone-page .triple-oql-grid {
    min-height: min(55vh, 28rem);
}
.triple-oql-standalone-page .triple-oql-query-ta {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.8125rem;
}
.triple-oql-standalone-page .triple-oql-table-wrap,
.triple-oql-standalone-page .triple-oql-matrix-wrap {
    max-height: min(45vh, 26rem);
    overflow: auto;
}
@media (min-width: 1200px) {
    .triple-oql-standalone-page .triple-oql-matrix-aside {
        border-top: none !important;
        padding-top: 0 !important;
        border-left: 1px solid var(--bs-secondary);
        padding-left: 1rem;
    }
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .modal-header,
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .modal-body {
    border-color: #dee2e6 !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .text-secondary {
    color: #6c757d !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .deriver-form-control-dark,
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .form-select {
    background-color: #fff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .btn-outline-light {
    color: #212529 !important;
    border-color: #adb5bd !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .btn-outline-light:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-panel-surface .btn-close-white {
    filter: none;
    opacity: 0.6;
}

/* OQL-Matrix: editierbare Zellen (inneres div — nicht td, vgl. Firefox), Tab-Navigation (oql.mdc todo 009) */
.triple-oql-matrix-wrap .triple-oql-matrix-cell-inner[contenteditable="true"] {
    cursor: text;
    min-width: 2.5rem;
    min-height: 1.5rem;
    outline: none;
}
.triple-oql-matrix-wrap .triple-oql-matrix-cell-inner[contenteditable="true"]:focus {
    box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.45);
    border-radius: 2px;
}
.triple-oql-root[data-oql-theme="light"] .triple-oql-matrix-wrap .triple-oql-matrix-cell-inner[contenteditable="true"]:focus {
    box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
}

/* triple-list.php: Seitenlayout v1/v2 + Ziehbalken (ontology.mdc todo 020) */
.triple-list-page-layout {
    display: grid;
    width: 100%;
    align-items: stretch;
    gap: 0;
    box-sizing: border-box;
}
/* v1: erste Zeile = natürliche Höhe Tabelle+Editor; Graph-Zeile füllt Rest — Fallback-Höhe ohne body.triple-list-page (Flex) */
.triple-list-page-layout--v1 {
    --triple-layout-above: 9rem;
    --triple-footer-reserve: 0px;
    grid-template-columns: minmax(0, 58%) 8px minmax(0, 42%);
    grid-template-rows: auto 8px minmax(260px, 1fr);
    grid-template-areas:
        'list rle editor'
        'main main main'
        'graph graph graph';
    min-height: max(360px, calc(100dvh - var(--triple-footer-reserve) - var(--triple-layout-above)));
    height: calc(100dvh - var(--triple-footer-reserve) - var(--triple-layout-above));
    max-height: calc(100dvh - var(--triple-footer-reserve));
}
.triple-list-page-layout--v1 #triple-list-card {
    grid-area: list;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.triple-list-page-layout--v1 #triple-resizer-list-editor {
    grid-area: rle;
}
.triple-list-page-layout--v1 #triple-editor-wrap {
    grid-area: editor;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.triple-list-page-layout--v1 #triple-resizer-main {
    grid-area: main;
}
.triple-list-page-layout--v1 #triple-graph-card {
    grid-area: graph;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
/* v2: linke Spalte = Tabelle natürliche Höhe, Editor darunter füllt Rest (kein fr auf der Tabellenzeile) */
.triple-list-page-layout--v2 {
    --triple-layout-above: 9rem;
    --triple-footer-reserve: 0px;
    grid-template-columns: minmax(0, 48%) 8px minmax(0, 52%);
    grid-template-rows: auto 8px minmax(0, 1fr);
    grid-template-areas:
        'list rmain graph'
        'rle rmain graph'
        'editor rmain graph';
    min-height: max(360px, calc(100dvh - var(--triple-footer-reserve) - var(--triple-layout-above)));
    height: calc(100dvh - var(--triple-footer-reserve) - var(--triple-layout-above));
    max-height: calc(100dvh - var(--triple-footer-reserve));
}
.triple-list-page-layout--v2 #triple-list-card {
    grid-area: list;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    max-height: none;
    align-self: start;
    display: flex;
    flex-direction: column;
}
.triple-list-page-layout--v2 #triple-resizer-list-editor {
    grid-area: rle;
}
.triple-list-page-layout--v2 #triple-editor-wrap {
    grid-area: editor;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.triple-list-page-layout--v2 #triple-editor-wrap > .rule-list-editor-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.triple-list-page-layout--v2 #triple-editor-wrap > .rule-list-editor-card > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.triple-list-page-layout--v2 #triple-resizer-main {
    grid-area: rmain;
}
.triple-list-page-layout--v2 #triple-graph-card {
    grid-area: graph;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
.triple-list-page-layout .triple-list-resizer--list-editor {
    cursor: col-resize;
}
.triple-list-page-layout--v2 .triple-list-resizer--list-editor {
    cursor: row-resize;
}
.triple-list-page-layout--v1 .triple-list-resizer--main {
    cursor: row-resize;
    min-height: 8px;
    height: 8px;
    align-self: stretch;
}
.triple-list-page-layout--v2 .triple-list-resizer--main {
    cursor: col-resize;
    min-width: 8px;
    width: 8px;
    align-self: stretch;
}
.triple-list-graph-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}
.triple-list-graph-card .card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* rule-list.php: Seitenlayout v1/v2 + Ziehbalken (ontology.mdc todo 025) */
.rule-list-page-layout {
    display: grid;
    width: 100%;
    align-items: stretch;
    gap: 0;
    box-sizing: border-box;
}
.rule-list-page-layout--v1 {
    --rule-layout-above: 14rem;
    --rule-footer-reserve: 60px;
    grid-template-columns: minmax(0, 58%) 8px minmax(0, 42%);
    grid-template-rows: auto 8px minmax(260px, 1fr);
    grid-template-areas:
        'list rle editor'
        'main main main'
        'graph graph graph';
    min-height: calc(100vh - var(--rule-footer-reserve) - var(--rule-layout-above));
    height: auto;
    max-height: none;
}
.rule-list-page-layout--v1 #rule-list-card {
    grid-area: list;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rule-list-page-layout--v1 #rule-resizer-list-editor {
    grid-area: rle;
}
.rule-list-page-layout--v1 #rule-editor-wrap {
    grid-area: editor;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.rule-list-page-layout--v1 #rule-resizer-main {
    grid-area: main;
}
.rule-list-page-layout--v1 #rule-graph-card {
    grid-area: graph;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
.rule-list-page-layout--v2 {
    --rule-layout-above: 14rem;
    --rule-footer-reserve: 60px;
    grid-template-columns: minmax(0, 48%) 8px minmax(0, 52%);
    grid-template-rows: auto 8px minmax(0, 1fr);
    grid-template-areas:
        'list rmain graph'
        'rle rmain graph'
        'editor rmain graph';
    min-height: max(360px, calc(100vh - var(--rule-footer-reserve) - var(--rule-layout-above)));
    height: calc(100vh - var(--rule-footer-reserve) - var(--rule-layout-above));
    max-height: calc(100vh - var(--rule-footer-reserve));
}
.rule-list-page-layout--v2 #rule-list-card {
    grid-area: list;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    max-height: none;
    align-self: start;
    display: flex;
    flex-direction: column;
}
.rule-list-page-layout--v2 #rule-resizer-list-editor {
    grid-area: rle;
}
.rule-list-page-layout--v2 #rule-editor-wrap {
    grid-area: editor;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rule-list-page-layout--v2 #rule-editor-wrap > .rule-list-editor-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rule-list-page-layout--v2 #rule-editor-wrap > .rule-list-editor-card > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.rule-list-page-layout--v2 #rule-resizer-main {
    grid-area: rmain;
}
.rule-list-page-layout--v2 #rule-graph-card {
    grid-area: graph;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
.rule-list-page-layout .triple-list-resizer--list-editor {
    cursor: col-resize;
}
.rule-list-page-layout--v2 .triple-list-resizer--list-editor {
    cursor: row-resize;
}
.rule-list-page-layout--v1 .triple-list-resizer--main {
    cursor: row-resize;
    min-height: 8px;
    height: 8px;
    align-self: stretch;
}
.rule-list-page-layout--v2 .triple-list-resizer--main {
    cursor: col-resize;
    min-width: 8px;
    width: 8px;
    align-self: stretch;
}
.rule-list-graph-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}
.rule-list-graph-card .card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#rule-graph-card .deriver-rule-network-viz--list {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

/* rule-list.php: created_at / updated_at mindestens 180px */
.rule-list-table th.rule-list-col-datetime,
.rule-list-table td.rule-list-col-datetime {
    min-width: 180px;
    box-sizing: border-box;
}

.deriver-flex-min-200 {
    min-width: 200px;
}

.deriver-cursor-pointer {
    cursor: pointer;
}

.deriver-btn-play-orange {
    border-color: #fd7e14;
    color: #fd7e14;
}

.deriver-rule-editor-search-form {
    max-width: 280px;
}

.deriver-assignments-value-input {
    min-width: 120px;
}

/* triple-list.php: Suche — variables Suchfeld */
.triple-list-search-form {
    width: 100%;
}
/* Suche direkt neben „Triple-Liste“ (Page-Header), Icons für Suchen / Zurücksetzen */
.triple-list-search-form--page-header {
    width: auto;
    flex: 1 1 14rem;
    max-width: min(100%, 36rem);
    min-width: 0;
}
.triple-list-search-form .triple-list-search-input-wrap {
    flex: 1 1 12rem;
    min-width: 0;
}

/* Regel-Netzwerk-Fläche (rule-list + deriver) */
.deriver-rule-network-viz {
    background: #161b22;
    border-radius: 6px;
    border: 1px solid #30363d;
}

.deriver-rule-network-viz--list {
    min-height: 560px;
    width: 100%;
}

/* triple-list.php: Triple-Netzwerk — füllt Card-Body (Höhe = gemessener Container) */
#triple-network-viz.deriver-rule-network-viz {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}
#triple-network-viz.deriver-triple-network-viz--dark {
    background: #21262d;
    border-color: #3d444d;
}
#triple-network-viz.deriver-triple-network-viz--light {
    background: #b8c2ce;
    border-color: #7a8796;
}

/* triple-list.php: Aktionsspalte — Bearbeiten / Kopieren / Löschen */
.triple-list-table td.triple-list-col-actions {
    white-space: nowrap;
    vertical-align: middle;
}
.triple-list-table td.triple-list-col-actions .btn {
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.1rem 0.3rem;
    min-height: 0;
}
.triple-list-table td.triple-list-col-actions .btn i {
    font-size: 0.7rem;
    width: 0.7rem;
    height: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* triple-list.php: Triples-Tabelle — geringere Zeilenhöhe (unter Bootstrap .table-sm) */
.triple-list-table.table-sm > :not(caption) > * > * {
    padding: 0.15rem 0.35rem;
}

/* triple-list.php: ontology.mdc todo 006 — s/p/o klickbar, blaue Unterstreichung, Schriftfarbe aus Ontologie */
.triple-list-table .triple-spotl-val-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #58a6ff;
    text-underline-offset: 2px;
}
.triple-list-table .triple-spotl-val-link:hover {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #79b8ff;
}

/* triple-list.php: Suchtreffer (wie admin.css / rule-list) */
.triple-list-table .search-hit {
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}
.triple-list-table .search-hit-1 {
    background-color: rgba(145, 105, 15, 0.58);
}
.triple-list-table .search-hit-2 {
    background-color: rgba(40, 95, 130, 0.55);
}
.triple-list-table .search-hit-3 {
    background-color: rgba(45, 110, 65, 0.5);
}
.triple-list-table .search-hit-4 {
    background-color: rgba(145, 80, 50, 0.55);
}
.triple-list-table .search-hit-5 {
    background-color: rgba(125, 65, 100, 0.5);
}
.triple-list-table .search-hit-6 {
    background-color: rgba(80, 65, 130, 0.5);
}

/* ontology.mdc todo 002: spotl-Tabellen — Klassen (^, Absent…) = maroon (auf dunklem Grund leicht aufgehellt) */
.table-dark td.deriver-spotl-node--caret,
.table-dark th.deriver-spotl-node--caret,
.table-dark td.deriver-spotl-node--absent,
.table-dark th.deriver-spotl-node--absent {
    color: #c06060 !important;
}
.table-dark td.deriver-spotl-node--gt,
.table-dark th.deriver-spotl-node--gt {
    color: #7ee787 !important;
}
.table-dark td.deriver-spotl-node--angle,
.table-dark th.deriver-spotl-node--angle {
    color: #79b8ff !important;
}
.table-dark td.deriver-spotl-node--dot,
.table-dark th.deriver-spotl-node--dot {
    color: #56d364 !important;
}
.table-dark td.deriver-spotl-p--subclass,
.table-dark th.deriver-spotl-p--subclass {
    color: #ff7b72 !important;
}
.table-dark td.deriver-spotl-p--pof,
.table-dark th.deriver-spotl-p--pof {
    color: #7ee787 !important;
}
.table-dark td.deriver-spotl-p--angle,
.table-dark th.deriver-spotl-p--angle {
    color: #1e3a8a !important;
}
.table-dark td.deriver-spotl-p--arrow,
.table-dark th.deriver-spotl-p--arrow {
    color: #58a6ff !important;
}

#deriver-session-json.deriver-session-json-pre,
pre#deriver-session-json.deriver-session-json-pre {
    white-space: pre-wrap;
    color: #8b949e;
}

/* ===== deriver.php: Layout & Session (aus ehem. <style> im Head) ===== */
#rule-network-viz.deriver-rule-network-viz {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    box-sizing: border-box;
}

/* rule-list / deriver: Regel-Netzwerk Hell/Dunkel (rule-network-viz.js, analog #triple-network-viz) */
#rule-network-viz.deriver-rule-network-viz--dark {
    background: #21262d;
    border-color: #3d444d;
}
#rule-network-viz.deriver-rule-network-viz--light {
    background: #b8c2ce;
    border-color: #7a8796;
}

/* expert.mdc todo 004: deriver-chat Hellmodus (?darkmode=0) — UI + Rule-Viz wie triple-network light */
body.deriver-chat-app.deriver-chat--light.expert-app {
    background: #f6f8fa !important;
}
body.deriver-chat-app.deriver-chat--light .user-list-outer.deriver-chat-page-shell {
    background: transparent;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main > .card.bg-dark {
    background-color: #f6f8fa !important;
    color: #24292f !important;
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main .border-bottom.border-secondary,
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main .border-secondary {
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main h2.text-light,
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main .text-light:not(.btn) {
    color: #24292f !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main .text-secondary {
    color: #57606a !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__ruleviz.card.bg-dark {
    background-color: #f6f8fa !important;
    color: #24292f !important;
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__ruleviz .text-secondary {
    color: #57606a !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__footer {
    background: #f6f8fa !important;
    border-top-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__footer .text-secondary {
    color: #57606a !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__footer .btn-outline-secondary {
    color: #24292f;
    border-color: #cfd7df;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-theme-btn {
    text-decoration: none;
}
body.deriver-chat-app.deriver-chat--light .deriver-chat-app__main .form-check-label.text-light {
    color: #24292f !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat {
    border-color: #d0d7de !important;
    background: rgba(255, 255, 255, 0.92);
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .border-secondary {
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .btn-close-white {
    filter: invert(1) grayscale(100%);
}

/* expert.mdc todo 005: Chat Hellmodus — Ask-/Skala-Buttons lesbar, Eingaben heller Grund + dunkle Schrift */
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .btn-outline-light {
    color: #24292f !important;
    border-color: #6e7781 !important;
    background-color: #ffffff;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .btn-outline-light:hover {
    color: #ffffff !important;
    background-color: #24292f !important;
    border-color: #24292f !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .btn-outline-secondary {
    color: #24292f !important;
    border-color: #8c959f !important;
    background-color: #ffffff;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .btn-outline-secondary:hover {
    color: #24292f !important;
    background-color: #f0f3f6 !important;
    border-color: #6e7781 !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .form-check-label.text-light {
    color: #24292f !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark,
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-assignments-value-input {
    background-color: #ffffff !important;
    color: #24292f !important;
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark::placeholder {
    color: #6e7781 !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark:focus,
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark:focus-visible {
    background-color: #ffffff !important;
    color: #24292f !important;
    border-color: #0969da !important;
    box-shadow: 0 0 0 0.2rem rgba(9, 105, 218, 0.2) !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark:-webkit-autofill,
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark:-webkit-autofill:hover,
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-form-control-dark:-webkit-autofill:focus {
    -webkit-text-fill-color: #24292f !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat #deriver-assignments-ifvars-fields input[type="text"] {
    background-color: #ffffff !important;
    color: #24292f !important;
    border-color: #d0d7de !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-assignments-ifvars-toolbar {
    border-bottom-color: rgba(36, 41, 47, 0.12) !important;
}

/* deriver-engine todo 023: Skip = orange (nicht Bootstrap-Warning-Gelb) */
.deriver-assignments-panel .deriver-assignments-btn-skip {
    background-color: #fd7e14;
    border-color: #e8590c;
    color: #fff;
}
.deriver-assignments-panel .deriver-assignments-btn-skip:hover {
    background-color: #e8590c;
    border-color: #d9480f;
    color: #fff;
}
.deriver-assignments-panel .deriver-assignments-btn-skip:focus,
.deriver-assignments-panel .deriver-assignments-btn-skip:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(253, 126, 20, 0.35);
    color: #fff;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-assignments-btn-skip {
    background-color: #fd7e14 !important;
    border-color: #e8590c !important;
    color: #fff !important;
}
body.deriver-chat-app.deriver-chat--light .deriver-assignments-panel--chat .deriver-assignments-btn-skip:hover {
    background-color: #e8590c !important;
    border-color: #d9480f !important;
    color: #fff !important;
}

/* Regel-Netzwerk-Card: Überschrift schrumpft, Toggle-Buttons bleiben sichtbar (nicht aus dem Viewport geschoben) */
.card-header .deriver-rule-network-header-h1 {
    flex: 1 1 auto;
    min-width: 0;
}
.deriver-rule-network-header-btns {
    flex-shrink: 0;
}

/* deriver.php todo 008: Zuweisungen inline unter Regel-Verarbeitung (kein Modal) */
.deriver-assignments-panel .deriver-assignments-panel-body {
    max-height: min(50vh, 28rem);
    overflow-y: auto;
    overflow-x: hidden;
}

/* ask(): Zeile 1 = Frage + Skip (ohne Unterstrich); rule.notes optional darunter; Trennlinie vor Buttons */
.deriver-assignments-panel .deriver-assignments-ask-line1 {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1em;
}
.deriver-assignments-panel .deriver-assignments-ask-line1 .btn {
    flex-shrink: 0;
}
.deriver-assignments-panel .deriver-assignments-ask-primary {
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
    color: #fd7e14 !important;
    font-weight: 600;
    text-decoration: none !important;
}
/* Gleiche Schriftgröße wie .btn-sm (Bootstrap 5: 0.875rem) */
.deriver-assignments-panel .deriver-assignments-rule-notes {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.875rem !important;
    line-height: 1.5;
}
.deriver-assignments-panel .deriver-assignments-headline {
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
    min-height: 1em;
    color: #fd7e14 !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.deriver-assignments-panel .deriver-assignments-ifvars-toolbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}
.deriver-assignments-panel .deriver-assignments-sec-title.deriver-assignments-headline {
    flex-shrink: 0;
}

/* deriver.php todo 054: Inline-Regel-Editor unter Regel-Verarbeitung */
.deriver-rule-editor-panel {
    max-height: min(72vh, 920px);
    overflow-y: auto;
    overflow-x: hidden;
}
.deriver-rule-editor-panel .rule-list-editor-card {
    min-height: 0;
}

/* todos.mdc todo 059: Restart — pink (H1 / .sg-heading-code-tint #d63384) */
.btn.deriver-btn-restart-pink {
    color: #fff !important;
    background-color: #d63384 !important;
    border-color: #d63384 !important;
}
.btn.deriver-btn-restart-pink:hover {
    color: #fff !important;
    background-color: #b02a6d !important;
    border-color: #b02a6d !important;
}
.btn.deriver-btn-restart-pink:focus,
.btn.deriver-btn-restart-pink:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.35);
}
.btn.deriver-btn-restart-pink:disabled {
    opacity: 0.55;
}

.deriver-regel-netzwerk-help {
    flex-shrink: 0;
}

/* todo 009: Regel-Netzwerk — 3 Spalten 4:1:1 (Graph | Agenda | Session), min. 320px rechts */
.deriver-network-split-root {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-height: 120px;
    overflow: hidden;
    box-sizing: border-box;
}

.deriver-pane-graph-wrap {
    flex: 4 1 0;
    min-width: 200px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.deriver-regel-netzwerk-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.deriver-regel-netzwerk-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* todo 026: rechts = Rule Processing oben, darunter Agenda | Session */
.deriver-pane-right-stack {
    flex: 2 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.deriver-pane-processing-wrap {
    flex: 0 0 auto;
}

.deriver-pane-agenda-session-row {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
}

.deriver-pane-agenda-wrap {
    flex: 1 1 0;
    min-width: 320px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.deriver-pane-session-wrap {
    flex: 1 1 0;
    min-width: 320px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.deriver-split-handle {
    flex-shrink: 0;
    background: #30363d;
    align-self: stretch;
}

.deriver-split-handle-v {
    width: 6px;
    cursor: col-resize;
}

.deriver-split-handle-h {
    height: 6px;
    width: 100%;
    cursor: row-resize;
}

.deriver-split-handle:hover {
    background: #58a6ff;
}

.deriver-pane-agenda-wrap > .card,
.deriver-pane-session-wrap > .card {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.deriver-panel-agenda,
.deriver-panel-session {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.deriver-panel-agenda .card-body,
.deriver-panel-session pre {
    flex: 1 1 auto;
    min-height: 0;
}

.deriver-val-true {
    color: #3fb950;
    font-weight: 600;
}

.deriver-val-false {
    color: #f85149;
    font-weight: 600;
}

.deriver-val-unknown {
    color: #d29922;
    font-weight: 600;
}

/* todo 029: Session-JSON variableList / ruleList */
.deriver-session-json-name {
    color: #79c0ff;
    font-weight: 500;
}

.deriver-session-json-priority {
    color: #f778ba;
    font-weight: 600;
}

.deriver-session-json-value-free {
    color: #e3b341;
    font-weight: 500;
}

/* expert.php – unten fixierte Suchleiste (angelehnt an robby search.php / .robby-app-bottom) */
.expert-app {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    background: #010409;
    /* Bar ist höher als 56px (lg-Input + Padding) — sonst wirkt der untere Inhalt „abgeschnitten“ */
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.expert-app__shell {
    padding-bottom: 1.25rem;
}

.expert-app-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #161b22;
    border-top: 1px solid #30363d;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}

.expert-app-search__form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto;
}

.expert-app-search__input-wrap {
    min-width: 0;
}

.expert-app-search__input {
    border-radius: 8px;
}

.expert-app-search__btn {
    flex-shrink: 0;
    border-radius: 8px;
}

/* expert.php – orange Buttons */
.expert-app .btn-expert-orange {
    --expert-orange: #e8590c;
    --expert-orange-hover: #d35400;
    --expert-orange-active: #c44e00;
    background-color: var(--expert-orange);
    border-color: var(--expert-orange);
    color: #fff;
}

.expert-app .btn-expert-orange:hover {
    background-color: var(--expert-orange-hover);
    border-color: var(--expert-orange-hover);
    color: #fff;
}

.expert-app .btn-expert-orange:focus {
    box-shadow: 0 0 0 0.2rem rgba(232, 89, 12, 0.45);
    color: #fff;
}

.expert-app .btn-expert-orange:active {
    background-color: var(--expert-orange-active);
    border-color: var(--expert-orange-active);
    color: #fff;
}

.expert-app .btn-expert-orange.disabled,
.expert-app .btn-expert-orange:disabled {
    background-color: #a85a28;
    border-color: #a85a28;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.75;
}

/* expert.php – Infocards (expert.mdc todo 003) */
.expert-app__cards {
    margin-bottom: 0.5rem;
}

.expert-kb-card {
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.expert-kb-card:hover {
    border-color: rgba(88, 166, 255, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.expert-kb-card__desc {
    line-height: 1.5;
    font-size: 1.0625rem;
}

/* ontology.mdc todo 012: UI-Sprache + Flaggenspalte l */
.deriver-ui-lang-form .deriver-ui-lang-select {
    min-width: 9.5rem;
    max-width: 12rem;
}

.deriver-flag-img {
    width: 20px;
    height: auto;
    vertical-align: -0.125em;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
