.content-editor-page {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 18px 20px 30px;
    color: #172033;
}

.content-editor-header,
.content-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.content-editor-header h1,
.content-card-heading h2 {
    margin: 0;
    color: #101827;
    letter-spacing: 0;
}

.content-editor-header h1 {
    font-size: clamp(1.65rem, 2.4vw, 2.35rem);
    font-weight: 900;
}

.content-card-heading h2 {
    font-size: 1.2rem;
    font-weight: 850;
}

.content-editor-kicker,
.content-card-kicker {
    display: block;
    color: #087cff;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.content-editor-card {
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
    padding: 14px;
}

.form-field-group {
    display: grid;
    gap: 6px;
}

.form-field-group label,
.media-form-column label,
.channel-form-grid label {
    color: #243044;
    font-weight: 800;
}

.form-field-control,
.project-index-search-input,
.project-index-select,
.tbhe,
.selectop {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd7e6;
    border-radius: 8px;
    background: #fff;
    color: #101827;
    padding: 8px 10px;
}

textarea.form-field-control,
textarea.tbhe {
    min-height: 100px;
    resize: vertical;
}

.form-field-control::placeholder,
.project-index-search-input::placeholder,
.tbhe::placeholder {
    color: #69758a;
}

.form-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.btnclear {
    border: 0;
    background: transparent;
    color: inherit;
}

.media-admin-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #dfe4ee;
    border-radius: 999px;
    background: #f6f8fc;
    color: #273246;
    font-size: .82rem;
    font-weight: 850;
}

.channel-admin-page {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 18px 20px 12px;
    color: #172033;
}

.channel-admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.channel-admin-head h1 {
    margin: 2px 0 0;
    color: #101827;
    font-size: clamp(1.65rem, 2.4vw, 2.35rem);
    font-weight: 900;
}

.channel-admin-actions-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.channel-admin-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 280px;
}

.channel-total {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe4ee;
    border-radius: 999px;
    background: #fff;
    color: #101827;
    font-weight: 900;
}

.channel-admin-layout {
    width: min(1480px, 100%);
    margin: 0 auto 28px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 16px;
}

.channel-admin-list {
    display: grid;
    align-content: start;
    gap: 10px;
}

.channel-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.channel-admin-card.is-selected {
    border-color: rgba(1, 169, 130, .65);
    box-shadow: 0 0 0 2px rgba(1, 169, 130, .18);
}

.channel-admin-select {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-left: 8px solid #01a982;
    color: #172033 !important;
    text-decoration: none;
}

.channel-admin-thumb {
    width: 72px;
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(1, 169, 130, .22), rgba(97, 71, 103, .28));
    color: #172033;
    font-size: 1.4rem;
    font-weight: 900;
}

.channel-admin-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.channel-admin-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.channel-admin-select span {
    color: #087cff;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.channel-status {
    width: max-content;
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.channel-status.is-on {
    background: rgba(1, 169, 130, .14);
    color: #047857;
}

.channel-status.is-off {
    background: rgba(148, 163, 184, .16);
    color: #64748b;
}

.channel-toggle.is-on i {
    color: #01a982 !important;
}

.channel-toggle.is-off i {
    color: #94a3b8 !important;
}

.channel-delete i {
    color: #ef4444 !important;
}

.channel-admin-select strong {
    color: #101827;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.channel-admin-select p {
    margin: 0;
    color: #4b5870;
    font-size: .88rem;
}

.channel-admin-select small {
    color: #5f6c80;
    font-weight: 750;
}

.channel-admin-actions {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.channel-admin-actions .btnclear,
.multimedia-icon-button {
    color: #273246;
}

.channel-admin-detail {
    min-width: 0;
}

.channel-detail-hero {
    position: relative;
    min-height: 220px;
    display: grid;
    align-items: end;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--channel-color, #01a982), #111827);
    color: #fff;
    margin-bottom: 14px;
}

.channel-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.86), rgba(0,0,0,.2));
    z-index: 1;
}

.channel-detail-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-detail-hero div {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.channel-detail-hero span {
    color: #b8ff35;
    font-weight: 900;
    text-transform: uppercase;
}

.channel-detail-hero h1 {
    margin: 4px 0;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    font-weight: 950;
}

.channel-detail-hero p {
    max-width: 720px;
    color: #eef2f7;
}

.channel-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.channel-related-grid section {
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    padding: 12px;
}

.channel-related-grid header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #edf1f7;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.channel-related-grid h3 {
    margin: 0;
    color: #101827;
    font-size: 1rem;
    font-weight: 900;
}

.channel-related-grid a {
    color: #087cff;
    font-weight: 800;
}

.channel-related-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px dotted #d9e0ec;
    color: #172033 !important;
    text-decoration: none;
}

.channel-related-row strong,
.channel-related-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-related-row small,
.channel-muted {
    color: #5f6c80;
}

.channel-admin-empty {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed #cfd7e6;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    padding: 24px;
}

.channel-admin-empty i {
    color: #01a982;
    font-size: 2.5rem;
}

.channel-flyout {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.channel-flyout[hidden] {
    display: none;
}

.channel-flyout-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
}

.channel-form {
    position: relative;
    z-index: 1;
    width: min(760px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    padding: 0 14px 14px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .35);
}

.fmmodhead {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 -14px 12px;
    padding: 0 14px;
    border-bottom: 1px solid #dfe4ee;
    color: #101827;
    font-weight: 900;
}

.channel-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.channel-form-grid label {
    display: grid;
    gap: 5px;
}

.channel-wide {
    grid-column: 1 / -1;
}

.channel-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.channel-color {
    height: 44px;
    padding: 4px;
}

.hi-dark-mode .content-editor-page,
[data-theme="dark"] .content-editor-page,
.hi-dark-mode .channel-admin-page,
[data-theme="dark"] .channel-admin-page,
.hi-dark-mode .channel-admin-layout,
[data-theme="dark"] .channel-admin-layout {
    color: #e5e7eb;
}

.hi-dark-mode .content-editor-card,
[data-theme="dark"] .content-editor-card,
.hi-dark-mode .channel-admin-card,
[data-theme="dark"] .channel-admin-card,
.hi-dark-mode .channel-related-grid section,
[data-theme="dark"] .channel-related-grid section,
.hi-dark-mode .channel-admin-empty,
[data-theme="dark"] .channel-admin-empty,
.hi-dark-mode .channel-form,
[data-theme="dark"] .channel-form {
    border-color: #253145;
    background: #111827;
    color: #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.hi-dark-mode .content-editor-header h1,
[data-theme="dark"] .content-editor-header h1,
.hi-dark-mode .content-card-heading h2,
[data-theme="dark"] .content-card-heading h2,
.hi-dark-mode .channel-admin-head h1,
[data-theme="dark"] .channel-admin-head h1,
.hi-dark-mode .channel-admin-select strong,
[data-theme="dark"] .channel-admin-select strong,
.hi-dark-mode .channel-related-grid h3,
[data-theme="dark"] .channel-related-grid h3,
.hi-dark-mode .fmmodhead,
[data-theme="dark"] .fmmodhead {
    color: #f8fafc;
}

.hi-dark-mode .form-field-group label,
[data-theme="dark"] .form-field-group label,
.hi-dark-mode .media-form-column label,
[data-theme="dark"] .media-form-column label,
.hi-dark-mode .channel-form-grid label,
[data-theme="dark"] .channel-form-grid label,
.hi-dark-mode .channel-admin-select,
[data-theme="dark"] .channel-admin-select,
.hi-dark-mode .channel-related-row,
[data-theme="dark"] .channel-related-row,
.hi-dark-mode .channel-admin-actions .btnclear,
[data-theme="dark"] .channel-admin-actions .btnclear,
.hi-dark-mode .multimedia-icon-button,
[data-theme="dark"] .multimedia-icon-button {
    color: #e5e7eb !important;
}

.hi-dark-mode .form-field-control,
[data-theme="dark"] .form-field-control,
.hi-dark-mode .project-index-search-input,
[data-theme="dark"] .project-index-search-input,
.hi-dark-mode .project-index-select,
[data-theme="dark"] .project-index-select,
.hi-dark-mode .tbhe,
[data-theme="dark"] .tbhe,
.hi-dark-mode .selectop,
[data-theme="dark"] .selectop {
    border-color: #334155;
    background: #0f172a;
    color: #f8fafc;
}

.hi-dark-mode .channel-admin-select p,
[data-theme="dark"] .channel-admin-select p,
.hi-dark-mode .channel-admin-select small,
[data-theme="dark"] .channel-admin-select small,
.hi-dark-mode .channel-related-row small,
[data-theme="dark"] .channel-related-row small,
.hi-dark-mode .channel-muted,
[data-theme="dark"] .channel-muted {
    color: #b8c3d4;
}

.hi-dark-mode .channel-total,
[data-theme="dark"] .channel-total,
.hi-dark-mode .media-admin-chip,
[data-theme="dark"] .media-admin-chip {
    border-color: #334155;
    background: #0f172a;
    color: #e5e7eb;
}

.hi-dark-mode .fmmodhead,
[data-theme="dark"] .fmmodhead,
.hi-dark-mode .channel-related-grid header,
[data-theme="dark"] .channel-related-grid header {
    border-color: #253145;
}

@media (max-width: 900px) {
    .content-editor-page,
    .channel-admin-page,
    .channel-admin-layout {
        padding-left: 12px;
        padding-right: 12px;
    }

    .channel-admin-head,
    .content-editor-header,
    .content-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .channel-admin-layout,
    .channel-related-grid,
    .channel-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin dark mode hardening: this file is loaded by admin pages after the base theme. */
html[data-theme="dark"] body.admin-page,
html[data-theme="dark"] body.admin-page .hi-main-content,
html[data-theme="dark"] body.admin-page main[role="main"],
html[data-theme="dark"] body.admin-page .content-editor-page,
html[data-theme="dark"] body.admin-page .channel-admin-page,
html[data-theme="dark"] body.admin-page .channel-admin-layout,
html[data-theme="dark"] body.admin-page .multimedia-page,
html[data-theme="dark"] body.admin-page .multimedia-library-page {
    background: #020617 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .content-editor-card,
html[data-theme="dark"] body.admin-page .channel-admin-card,
html[data-theme="dark"] body.admin-page .channel-form,
html[data-theme="dark"] body.admin-page .channel-related-grid,
html[data-theme="dark"] body.admin-page .channel-related-row,
html[data-theme="dark"] body.admin-page .fmform,
html[data-theme="dark"] body.admin-page .fmformwhite,
html[data-theme="dark"] body.admin-page .fmcool,
html[data-theme="dark"] body.admin-page .fmcooltrans,
html[data-theme="dark"] body.admin-page .card,
html[data-theme="dark"] body.admin-page .card-body,
html[data-theme="dark"] body.admin-page .card-header,
html[data-theme="dark"] body.admin-page .card-footer,
html[data-theme="dark"] body.admin-page .bg-white,
html[data-theme="dark"] body.admin-page .bg-light {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .08), transparent 32%),
        linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
    border-color: #253145 !important;
    color: #e5e7eb !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] body.admin-page .content-editor-header h1,
html[data-theme="dark"] body.admin-page .content-card-heading h2,
html[data-theme="dark"] body.admin-page .channel-admin-head h1,
html[data-theme="dark"] body.admin-page .channel-admin-select strong,
html[data-theme="dark"] body.admin-page .channel-related-grid h3,
html[data-theme="dark"] body.admin-page h1,
html[data-theme="dark"] body.admin-page h2,
html[data-theme="dark"] body.admin-page h3,
html[data-theme="dark"] body.admin-page h4,
html[data-theme="dark"] body.admin-page h5,
html[data-theme="dark"] body.admin-page strong,
html[data-theme="dark"] body.admin-page label,
html[data-theme="dark"] body.admin-page td,
html[data-theme="dark"] body.admin-page th,
html[data-theme="dark"] body.admin-page .form-label,
html[data-theme="dark"] body.admin-page .form-check-label {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}

html[data-theme="dark"] body.admin-page p,
html[data-theme="dark"] body.admin-page small,
html[data-theme="dark"] body.admin-page .text-muted,
html[data-theme="dark"] body.admin-page .channel-muted,
html[data-theme="dark"] body.admin-page .channel-admin-select p,
html[data-theme="dark"] body.admin-page .channel-admin-select small,
html[data-theme="dark"] body.admin-page .channel-related-row small {
    color: #b8c3d4 !important;
    -webkit-text-fill-color: #b8c3d4;
}

html[data-theme="dark"] body.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html[data-theme="dark"] body.admin-page textarea,
html[data-theme="dark"] body.admin-page select,
html[data-theme="dark"] body.admin-page .form-control,
html[data-theme="dark"] body.admin-page .form-select,
html[data-theme="dark"] body.admin-page .form-field-control,
html[data-theme="dark"] body.admin-page .tbhe,
html[data-theme="dark"] body.admin-page .tbher,
html[data-theme="dark"] body.admin-page .selectop {
    background: #020617 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
    box-shadow: none !important;
}

html[data-theme="dark"] body.admin-page input::placeholder,
html[data-theme="dark"] body.admin-page textarea::placeholder {
    color: #7f8ea3 !important;
    -webkit-text-fill-color: #7f8ea3;
}

html[data-theme="dark"] body.admin-page input[type="file"]::file-selector-button {
    background: #111827 !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .tabla,
html[data-theme="dark"] body.admin-page table,
html[data-theme="dark"] body.admin-page tr,
html[data-theme="dark"] body.admin-page td,
html[data-theme="dark"] body.admin-page th {
    background-color: transparent !important;
    border-color: #253145 !important;
}

html[data-theme="dark"] body.admin-page .fmmodhead,
html[data-theme="dark"] body.admin-page .admin-panel-header {
    background: linear-gradient(135deg, #172033, #1e293b) !important;
    border-color: #253145 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.admin-page .channel-status.is-on {
    background: rgba(20, 184, 166, .18) !important;
    color: #5eead4 !important;
    -webkit-text-fill-color: #5eead4;
}

html[data-theme="dark"] body.admin-page .channel-status.is-off {
    background: rgba(148, 163, 184, .16) !important;
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1;
}

html[data-theme="dark"] body.admin-page .channel-toggle.is-on i {
    color: #5eead4 !important;
}

html[data-theme="dark"] body.admin-page .channel-toggle.is-off i {
    color: #94a3b8 !important;
}

html[data-theme="dark"] body.admin-page .channel-delete i {
    color: #f87171 !important;
}

/* Summernote dark mode: Publicar/Contenido editors render their own editable surface. */
html[data-theme="dark"] body.admin-page .note-editor,
html[data-theme="dark"] body.admin-page .note-editor.note-frame,
html[data-theme="dark"] body.admin-page .note-editor.note-airframe {
    background: #020617 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.admin-page .note-editor .note-toolbar,
html[data-theme="dark"] body.admin-page .note-editor .note-statusbar,
html[data-theme="dark"] body.admin-page .note-editor .note-popover .popover-content {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .note-editor .note-editing-area,
html[data-theme="dark"] body.admin-page .note-editor .note-editable,
html[data-theme="dark"] body.admin-page .note-editor .note-codable {
    background: #020617 !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
}

html[data-theme="dark"] body.admin-page .note-editor .note-placeholder {
    color: #7f8ea3 !important;
    -webkit-text-fill-color: #7f8ea3 !important;
}

html[data-theme="dark"] body.admin-page .note-editor .note-editable *,
html[data-theme="dark"] body.admin-page .note-editor .note-codable {
    color: inherit;
}

html[data-theme="dark"] body.admin-page .note-editor .note-btn,
html[data-theme="dark"] body.admin-page .note-editor .dropdown-toggle {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .note-editor .note-btn:hover,
html[data-theme="dark"] body.admin-page .note-editor .note-btn:focus,
html[data-theme="dark"] body.admin-page .note-editor .note-btn.active {
    background: #1e293b !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body.admin-page .note-editor .dropdown-menu {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .note-editor .dropdown-item,
html[data-theme="dark"] body.admin-page .note-editor .note-dropdown-item,
html[data-theme="dark"] body.admin-page .note-editor .note-color-reset,
html[data-theme="dark"] body.admin-page .note-editor .note-color-select {
    color: #e5e7eb !important;
    -webkit-text-fill-color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .note-editor .dropdown-item:hover,
html[data-theme="dark"] body.admin-page .note-editor .note-dropdown-item:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}

/* Admin actions must remain readable on the permanent dark workspace. */
html.hi-dark-mode body.admin-page .content-editor-page .btn-light,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-light,
html.hi-dark-mode body.admin-page .channel-admin-page .btn-light,
html[data-theme="dark"] body.admin-page .channel-admin-page .btn-light {
    background: #e1e1e1 !important;
    border-color: #c6c9ca !important;
    color: #050607 !important;
    -webkit-text-fill-color: #050607 !important;
}

html.hi-dark-mode body.admin-page .content-editor-page .btn-light:hover,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-light:hover,
html.hi-dark-mode body.admin-page .channel-admin-page .btn-light:hover,
html[data-theme="dark"] body.admin-page .channel-admin-page .btn-light:hover {
    background: #2ad2c9 !important;
    border-color: #2ad2c9 !important;
    color: #050607 !important;
}

html.hi-dark-mode body.admin-page .content-editor-page .btn-outline-secondary,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-outline-secondary,
html.hi-dark-mode body.admin-page .content-editor-page .btn-outline-primary,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-outline-primary {
    border-color: #5f7a76 !important;
    color: #e1e1e1 !important;
    -webkit-text-fill-color: #e1e1e1 !important;
}

html.hi-dark-mode body.admin-page .content-editor-page .btn-outline-secondary:hover,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-outline-secondary:hover,
html.hi-dark-mode body.admin-page .content-editor-page .btn-outline-primary:hover,
html[data-theme="dark"] body.admin-page .content-editor-page .btn-outline-primary:hover {
    background: #425563 !important;
    border-color: #2ad2c9 !important;
    color: #e1e1e1 !important;
}

html.hi-dark-mode body.admin-page .content-editor-page .text-dark,
html[data-theme="dark"] body.admin-page .content-editor-page .text-dark {
    color: #e1e1e1 !important;
    -webkit-text-fill-color: #e1e1e1 !important;
}

html.hi-dark-mode body.admin-page .content-editor-page .text-muted,
html[data-theme="dark"] body.admin-page .content-editor-page .text-muted {
    color: #c6c9ca !important;
    -webkit-text-fill-color: #c6c9ca !important;
}

html.hi-dark-mode body.admin-page .icblack24,
html[data-theme="dark"] body.admin-page .icblack24,
html.hi-dark-mode body.admin-page .icblack32,
html[data-theme="dark"] body.admin-page .icblack32 {
    color: #2ad2c9 !important;
    -webkit-text-fill-color: #2ad2c9 !important;
}

/* Compact content manager, aligned with Intranet10's editorial list. */
.content-manager-page {
    display: grid;
    gap: 14px;
}

.content-manager-page .content-editor-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: .86rem;
}

.content-manager-filter-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(180px, .7fr) minmax(150px, .55fr);
    gap: 12px;
}

.content-manager-search-control {
    position: relative;
}

.content-manager-search-control > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #64748b;
    transform: translateY(-50%);
    pointer-events: none;
}

.content-manager-search-control .form-field-control {
    padding-left: 38px;
}

.content-manager-results {
    padding-top: 0;
    padding-bottom: 0;
}

.content-manager-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    border-bottom: 1px solid #dfe4ee;
    color: #64748b;
    font-size: .78rem;
}

.content-manager-results-head strong {
    color: #172033;
    font-size: .86rem;
}

.content-search-results {
    display: flex;
    flex-direction: column;
}

.content-search-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.content-search-row:last-child {
    border-bottom: 0;
}

.content-search-thumb {
    position: relative;
    height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #eef2f6;
    color: #5f7a76;
}

.content-search-thumb img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-search-copy {
    min-width: 0;
}

.content-search-copy h2 {
    margin: 5px 0 3px;
    color: #172033;
    font-size: 1rem;
    font-weight: 800;
}

.content-search-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 4px;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.content-search-copy small {
    color: #64748b;
    font-size: .72rem;
}

.content-search-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.content-search-badges span {
    padding: 3px 7px;
    border: 1px solid #dfe4ee;
    border-radius: 6px;
    background: #f8fafc;
    color: #425563;
    font-size: .65rem;
    font-weight: 750;
}

.content-search-badges .is-published {
    border-color: rgba(1, 169, 130, .35);
    color: #008567;
}

.content-search-badges .is-draft {
    border-color: rgba(255, 141, 109, .45);
    color: #9a432e;
}

.content-search-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-search-actions form {
    margin: 0;
}

.content-icon-action {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d8e0e9;
    border-radius: 8px;
    background: #fff;
    color: #425563;
    text-decoration: none;
}

.content-icon-action:hover,
.content-icon-action:focus-visible {
    border-color: #01a982;
    color: #008567;
    outline: 3px solid rgba(1, 169, 130, .14);
}

.content-icon-danger:hover,
.content-icon-danger:focus-visible {
    border-color: #ff8d6d;
    color: #a33a20;
    outline-color: rgba(255, 141, 109, .16);
}

.content-manager-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: #64748b;
    text-align: center;
}

.content-manager-empty i {
    color: #01a982;
    font-size: 1.5rem;
}

.content-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
    border-top: 1px solid #dfe4ee;
}

.content-pagination a {
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d8e0e9;
    border-radius: 7px;
    color: #425563;
    text-decoration: none;
}

.content-pagination a.active {
    border-color: #01a982;
    background: #01a982;
    color: #fff;
}

html[data-theme="dark"] body.admin-page .content-manager-page .content-editor-header p,
html[data-theme="dark"] body.admin-page .content-manager-results-head,
html[data-theme="dark"] body.admin-page .content-search-copy p,
html[data-theme="dark"] body.admin-page .content-search-copy small {
    color: #c6c9ca !important;
}

html[data-theme="dark"] body.admin-page .content-manager-results-head,
html[data-theme="dark"] body.admin-page .content-search-row,
html[data-theme="dark"] body.admin-page .content-pagination {
    border-color: rgba(198, 201, 202, .22) !important;
}

html[data-theme="dark"] body.admin-page .content-manager-results-head strong,
html[data-theme="dark"] body.admin-page .content-search-copy h2 {
    color: #f6f7f8 !important;
}

html[data-theme="dark"] body.admin-page .content-search-thumb,
html[data-theme="dark"] body.admin-page .content-search-badges span,
html[data-theme="dark"] body.admin-page .content-icon-action,
html[data-theme="dark"] body.admin-page .content-pagination a {
    border-color: rgba(198, 201, 202, .24);
    background: #0c0f12;
    color: #e1e1e1;
}

/* Categories use the same compact administration surface as the content manager. */
.content-editor-header p {
    margin: .35rem 0 0;
    color: #5f6c80;
    font-size: .86rem;
}

.content-category-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}

.content-category-form {
    position: sticky;
    top: 132px;
}

.content-category-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 12px;
    align-items: end;
}

.content-category-name {
    grid-column: 1 / -1;
}

.content-check-inline {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #243044;
    font-size: .84rem;
    font-weight: 800;
}

.content-check-inline input {
    width: 18px;
    height: 18px;
    accent-color: #01a982;
}

.content-category-list {
    display: flex;
    flex-direction: column;
}

.content-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #dfe4ee;
}

.content-category-row:last-child {
    border-bottom: 0;
}

.content-category-row.is-editing {
    margin-inline: -8px;
    padding-inline: 8px;
    border-radius: 7px;
    background: rgba(1, 169, 130, .1);
}

.content-category-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.content-category-main strong {
    overflow: hidden;
    color: #172033;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-category-main small {
    color: #5f6c80;
    font-size: .75rem;
}

.content-category-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.content-category-actions form {
    margin: 0;
}

html[data-theme="dark"] body.admin-page .content-editor-header p,
html[data-theme="dark"] body.admin-page .content-category-main small {
    color: #c6c9ca;
}

html[data-theme="dark"] body.admin-page .content-category-main strong,
html[data-theme="dark"] body.admin-page .content-check-inline {
    color: #f6f7f8;
}

html[data-theme="dark"] body.admin-page .content-category-row {
    border-color: rgba(198, 201, 202, .22);
}

html[data-theme="dark"] body.admin-page .content-category-row.is-editing {
    background: rgba(1, 169, 130, .16);
}

@media (max-width: 900px) {
    .content-category-layout {
        grid-template-columns: 1fr;
    }

    .content-category-form {
        position: static;
    }
}

@media (max-width: 560px) {
    .content-category-form-grid {
        grid-template-columns: 1fr;
    }

    .content-category-name {
        grid-column: auto;
    }
}

html[data-theme="dark"] body.admin-page .content-search-badges .is-published {
    border-color: rgba(42, 210, 201, .45);
    color: #2ad2c9;
}

html[data-theme="dark"] body.admin-page .content-search-badges .is-draft {
    border-color: rgba(255, 141, 109, .5);
    color: #ff8d6d;
}

@media (max-width: 850px) {
    .content-manager-filter-grid,
    .content-search-row {
        grid-template-columns: 1fr;
    }

    .content-search-thumb {
        height: 160px;
    }

    .content-search-actions {
        justify-content: flex-end;
    }
}

/* Channels admin palette and contrast. */
html[data-theme="light"] body.admin-page .channel-admin-toolbar,
html[data-theme="light"] body.admin-page .channel-admin-card,
html[data-theme="light"] body.admin-page .channel-related-grid section,
html[data-theme="light"] body.admin-page .channel-admin-empty,
html[data-theme="light"] body.admin-page .channel-form {
    border-color: #c6c9ca !important;
    background: #e7ecef !important;
    color: #172033 !important;
    box-shadow: none !important;
}

html[data-theme="light"] body.admin-page .channel-admin-card.is-selected {
    border-color: #01a982 !important;
    box-shadow: 0 0 0 2px rgba(1, 169, 130, .16) !important;
}

html[data-theme="light"] body.admin-page .channel-admin-select,
html[data-theme="light"] body.admin-page .channel-admin-select strong,
html[data-theme="light"] body.admin-page .channel-related-grid h3,
html[data-theme="light"] body.admin-page .channel-related-row,
html[data-theme="light"] body.admin-page .fmmodhead,
html[data-theme="light"] body.admin-page .channel-form-grid label {
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="light"] body.admin-page .channel-admin-select span,
html[data-theme="light"] body.admin-page .channel-related-grid a {
    color: #008567 !important;
    -webkit-text-fill-color: #008567 !important;
}

html[data-theme="light"] body.admin-page .channel-admin-select p,
html[data-theme="light"] body.admin-page .channel-admin-select small,
html[data-theme="light"] body.admin-page .channel-related-row small,
html[data-theme="light"] body.admin-page .channel-muted {
    color: #425563 !important;
    -webkit-text-fill-color: #425563 !important;
}

html[data-theme="light"] body.admin-page .channel-admin-actions .btnclear {
    color: #425563 !important;
    -webkit-text-fill-color: #425563 !important;
}

html[data-theme="light"] body.admin-page .channel-status.is-on {
    background: rgba(1, 169, 130, .14) !important;
    color: #008567 !important;
    -webkit-text-fill-color: #008567 !important;
}

html[data-theme="light"] body.admin-page .channel-status.is-off {
    background: rgba(128, 116, 110, .14) !important;
    color: #5f7a76 !important;
    -webkit-text-fill-color: #5f7a76 !important;
}

html[data-theme="light"] body.admin-page .channel-total,
html[data-theme="light"] body.admin-page .channel-form .tbhe,
html[data-theme="light"] body.admin-page .channel-form .selectop,
html[data-theme="light"] body.admin-page .channel-admin-toolbar .tbhe,
html[data-theme="light"] body.admin-page .channel-admin-toolbar .selectop {
    border-color: #c6c9ca !important;
    background: #ffffff !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="dark"] body.admin-page .channel-admin-toolbar,
html[data-theme="dark"] body.admin-page .channel-admin-card,
html[data-theme="dark"] body.admin-page .channel-related-grid section,
html[data-theme="dark"] body.admin-page .channel-admin-empty,
html[data-theme="dark"] body.admin-page .channel-form {
    border-color: #425563 !important;
    background: #0c0f12 !important;
    color: #e1e1e1 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.admin-page .channel-admin-card.is-selected {
    border-color: #2ad2c9 !important;
    box-shadow: 0 0 0 2px rgba(42, 210, 201, .16) !important;
}

html[data-theme="dark"] body.admin-page .channel-admin-select span,
html[data-theme="dark"] body.admin-page .channel-related-grid a {
    color: #2ad2c9 !important;
    -webkit-text-fill-color: #2ad2c9 !important;
}

html[data-theme="dark"] body.admin-page .channel-status.is-on {
    background: rgba(42, 210, 201, .14) !important;
    color: #2ad2c9 !important;
    -webkit-text-fill-color: #2ad2c9 !important;
}

html[data-theme="dark"] body.admin-page .channel-status.is-off {
    background: rgba(198, 201, 202, .12) !important;
    color: #c6c9ca !important;
    -webkit-text-fill-color: #c6c9ca !important;
}

html[data-theme="dark"] body.admin-page .channel-form .tbhe,
html[data-theme="dark"] body.admin-page .channel-form .selectop,
html[data-theme="dark"] body.admin-page .channel-admin-toolbar .tbhe,
html[data-theme="dark"] body.admin-page .channel-admin-toolbar .selectop {
    border-color: #425563 !important;
    background: #11151a !important;
    color: #e1e1e1 !important;
    -webkit-text-fill-color: #e1e1e1 !important;
}

html[data-theme="light"] body.admin-page .channel-related-grid header,
html[data-theme="light"] body.admin-page .fmmodhead {
    border-color: #c6c9ca !important;
}

html[data-theme="dark"] body.admin-page .channel-related-grid header,
html[data-theme="dark"] body.admin-page .fmmodhead {
    border-color: #425563 !important;
}
