/* Artículos (Knowledge) — shell 2 paneles Odoo-like (Ola 0+A) */
.knowledge-module-nav + .sfe-module-shell__body,
.sfe-module-shell__body:has(.kn-odo-shell) {
    padding-top: 0;
}

.kn-odo-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    min-height: calc(100vh - 140px);
    margin: 0 -4px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.kn-odo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px;
    border-right: 1px solid var(--sfe-border, #e2e8f0);
    background: var(--sfe-surface-muted, #f8fafc);
    min-height: 0;
}

.kn-odo-sidebar__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kn-odo-search .form-control {
    font-size: 0.85rem;
    min-height: 32px;
}

.kn-odo-new__btn {
    width: 100%;
    justify-content: center;
    min-height: 32px;
    font-size: 0.85rem;
}

.kn-odo-spaces {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kn-odo-space {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sfe-text-muted, #64748b);
    text-decoration: none;
}

.kn-odo-space:hover {
    background: rgba(0, 123, 255, 0.06);
    color: var(--sfe-navy, #1e2b3c);
}

.kn-odo-space.is-active {
    background: rgba(0, 123, 255, 0.1);
    color: var(--sfe-primary, #007bff);
}

.kn-odo-space__count {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.75;
}

.kn-odo-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.kn-odo-tree__empty {
    padding: 8px;
    font-size: 0.82rem;
}

.kn-odo-tree__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.84rem;
    color: var(--sfe-navy, #1e2b3c);
    text-decoration: none;
}

.kn-odo-tree__item:hover {
    background: rgba(15, 23, 42, 0.04);
}

.kn-odo-tree__item.is-active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    font-weight: 600;
}

.kn-odo-tree__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.kn-odo-tree__badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    flex-shrink: 0;
}

.kn-odo-canvas {
    padding: 20px 28px 32px;
    overflow-y: auto;
    min-height: 0;
}

.kn-odo-empty {
    max-width: 480px;
    margin: 48px auto;
    text-align: center;
}

.kn-odo-empty h2 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sfe-navy, #1e2b3c);
}

.kn-odo-doc__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.kn-odo-doc__state {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.kn-odo-doc__state.state-published {
    background: #dcfce7;
    color: #166534;
}

.kn-odo-doc__title,
.kn-odo-doc__title-read {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--sfe-navy, #1e2b3c);
    margin: 0 0 16px;
    padding: 0;
}

.kn-odo-doc__title:focus {
    outline: none;
}

.kn-odo-doc__body {
    display: block;
    width: 100%;
    min-height: 360px;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--sfe-text, #334155);
    padding: 0;
    font-family: inherit;
}

.kn-odo-doc__body:focus {
    outline: none;
}

.kn-odo-doc__body-read {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--sfe-text, #334155);
}

/* Ola B — bloques + slash */
.kn-blocks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 280px;
}

.kn-block {
    outline: none;
    border-radius: 4px;
    padding: 2px 4px;
    color: var(--sfe-text, #334155);
    line-height: 1.6;
}

.kn-block:focus {
    background: rgba(0, 123, 255, 0.04);
}

.kn-block--h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--sfe-navy, #1e2b3c);
}

.kn-block--h2 {
    font-size: 1.2rem;
    font-weight: 650;
    color: var(--sfe-navy, #1e2b3c);
}

.kn-block--bullet {
    padding-left: 1.25rem;
    position: relative;
}

.kn-block--bullet::before {
    content: "•";
    position: absolute;
    left: 0.35rem;
    color: var(--gray-500, #6b7280);
}

.kn-check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: text;
}

.kn-check-row input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.kn-block--hr {
    padding: 8px 0;
}

.kn-block--hr hr {
    border: none;
    border-top: 1px solid var(--sfe-border, #e2e8f0);
    margin: 0;
}

.kn-slash {
    position: absolute;
    z-index: 50;
    min-width: 180px;
    padding: 4px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.kn-slash__item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--sfe-navy, #1e2b3c);
}

.kn-slash__item:hover {
    background: rgba(0, 123, 255, 0.08);
}

.kn-odo-doc__hint {
    margin-top: 6px;
    font-size: 0.78rem;
}

.kn-read-body .kn-read-h1 {
    font-size: 1.35rem;
    margin: 0.75rem 0 0.35rem;
}

.kn-read-body .kn-read-h2 {
    font-size: 1.12rem;
    margin: 0.6rem 0 0.3rem;
}

.kn-read-body .kn-read-p {
    margin: 0 0 0.5rem;
}

.kn-read-body .kn-read-list {
    margin: 0 0 0.75rem 1.25rem;
}

.kn-read-body .kn-read-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 0.35rem;
}

.kn-read-hr {
    border: none;
    border-top: 1px solid var(--sfe-border, #e2e8f0);
    margin: 12px 0;
}

.kn-odo-doc {
    position: relative;
}

.kn-odo-doc__save {
    margin-top: 8px;
    font-size: 0.8rem;
}

.kn-odo-doc__save.is-ok {
    color: #166534;
}

.kn-odo-doc__save.is-error {
    color: #b91c1c;
}

@media (max-width: 900px) {
    .kn-odo-shell {
        grid-template-columns: 1fr;
    }

    .kn-odo-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--sfe-border, #e2e8f0);
        max-height: 240px;
    }
}


/* Ola C+D */
.kn-odo-doc__bar--actions {
    flex-wrap: wrap;
    gap: 8px;
}

.kn-odo-doc__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: auto;
}

.kn-odo-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: 6px;
    background: #fff;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.kn-odo-act.is-on {
    background: #fef3c7;
    border-color: #f59e0b;
}

.kn-odo-act--danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.kn-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 16px auto 0;
}

.kn-tpl-card__btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px 12px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font: inherit;
}

.kn-tpl-card__btn strong {
    font-size: 0.9rem;
}

.kn-tpl-card__btn span {
    font-size: 0.78rem;
    color: var(--gray-500, #6b7280);
}

.kn-history-list {
    list-style: none;
    padding: 0;
}

.kn-history-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--sfe-border, #e2e8f0);
}

.kn-odo-templates h2 {
    text-align: center;
}
