/* TelosCMS admin, on CoreUI 5 (Bootstrap 5 based). */

/* CoreUI sets --cui-sidebar-occupy-start on the sidebar's siblings; the wrapper makes room for it. */
.wrapper {
    width: 100%;
    padding-inline-start: var(--cui-sidebar-occupy-start, 0);
    padding-inline-end: var(--cui-sidebar-occupy-end, 0);
    transition: padding .15s;
}

.header > .container-fluid {
    min-height: 4rem;
}

.header-toggler {
    margin-inline-start: -.75rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

/* Telos branding: white wordmark on the dark sidebar; the round mark (on a white disc, so its navy segment
   shows against the dark background) when the sidebar is narrowed. */
.sidebar-brand .brand-logo { height: 40px; width: auto; }
.sidebar-brand .brand-mark {
    width: 34px; height: 34px; padding: 2px;
    background: #fff; border-radius: 50%;
}
.signin-logo { width: min(100%, 300px); height: auto; }

/* User guide */
.help-guide li + li { margin-top: .35rem; }
.help-guide code { white-space: nowrap; }
.help-contents { position: sticky; top: 5.5rem; }
.help-contents li + li { margin-top: .4rem; }

/* Header: which site this admin belongs to */
.site-badge {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .3rem .75rem; border-radius: 999px;
    background: var(--cui-primary-bg-subtle); color: var(--cui-primary-text-emphasis);
    font-weight: 600; line-height: 1.2;
}
.site-badge:hover { background: var(--cui-primary); color: #fff; }
.site-badge__host { font-weight: 400; font-size: .8em; opacity: .75; }

/* Media library: folders on the left, files on the right */
.media-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 767.98px) { .media-layout { grid-template-columns: 1fr; } }
.media-folders { border: 1px solid var(--cui-border-color); border-radius: .5rem; background: var(--cui-body-bg); padding: .5rem; }
.media-folders__list { list-style: none; margin: 0 0 .75rem; padding: 0; max-height: 24rem; overflow-y: auto; }
.media-folders__link { display: flex; align-items: center; gap: .25rem; padding: .4rem .6rem; border-radius: .375rem; color: inherit; text-decoration: none; font-size: .9rem; }
.media-folders__link--sub { padding-left: calc(.6rem + var(--depth, 0) * 1rem); }
.media-folders__link:hover, .media-folders__link:focus-visible { background: var(--cui-tertiary-bg); outline: none; }
.media-folders__link.active { background: var(--cui-primary-bg-subtle); color: var(--cui-primary-text-emphasis); font-weight: 600; }
.media-folders__new { border-top: 1px solid var(--cui-border-color); padding-top: .6rem; }
.media-tile { position: relative; }
.media-tile__check { position: absolute; top: .4rem; left: .4rem; z-index: 2; width: 1.15rem; height: 1.15rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.media-movebar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .75rem; padding: .6rem .75rem; border: 1px solid var(--cui-border-color); border-radius: .5rem; background: var(--cui-tertiary-bg); }
.media-folder-tools summary { cursor: pointer; color: var(--cui-secondary-color); }

/* Icon picker */
.icon-dialog { border: 0; border-radius: .75rem; padding: 0; width: min(46rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .35); background: var(--cui-body-bg); color: var(--cui-body-color); }
.icon-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.icon-dialog__body { padding: 1rem; }
.icon-dialog__tabs { display: flex; gap: .4rem; margin-bottom: .75rem; }
.icon-dialog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .4rem; max-height: 22rem; overflow-y: auto; }
.icon-dialog__item { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .3rem; border: 1px solid var(--cui-border-color); border-radius: .5rem; background: transparent; color: inherit; }
.icon-dialog__item i { font-size: 1.4rem; }
.icon-dialog__item span { font-size: .65rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; color: var(--cui-secondary-color); }
.icon-dialog__item:hover, .icon-dialog__item:focus-visible { background: var(--cui-primary-bg-subtle); border-color: var(--cui-primary); outline: none; }
.icon-dialog__item.active { border-color: var(--cui-primary); background: var(--cui-primary-bg-subtle); }
.icon-preview { min-width: 2.6rem; justify-content: center; }

/* Result of the last action: a dialog that closes itself (admin.js) */
.flash-dialog { border: 0; border-radius: .75rem; padding: 0; width: min(28rem, calc(100vw - 2rem)); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .35); background: var(--cui-body-bg); color: var(--cui-body-color); overflow: hidden; }
.flash-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.flash-dialog__body { display: flex; gap: 1rem; padding: 1.25rem 1.25rem .75rem; }
.flash-dialog__icon { font-size: 1.75rem; margin-top: .1rem; }
.flash-dialog--ok .flash-dialog__icon { color: var(--cui-success); }
.flash-dialog--problem .flash-dialog__icon { color: var(--cui-danger); }
.flash-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem 1.25rem 1rem; }
.flash-dialog__count { font-size: .8rem; color: var(--cui-secondary-color); }
.flash-dialog__bar { height: 4px; background: var(--cui-tertiary-bg); }
.flash-dialog__bar > span { display: block; height: 100%; width: 100%; background: var(--cui-primary); }
.flash-dialog--problem .flash-dialog__bar > span { background: var(--cui-danger); }
@media (prefers-reduced-motion: no-preference) { .flash-dialog[open] { animation: flash-in .18s ease-out; } }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Template editor: the "Insert a token" list */
.token-picker__list { max-height: 22rem; overflow-y: auto; border: 1px solid var(--cui-border-color); border-radius: .375rem; }
.token-picker__group { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; margin: 0; padding: .35rem .6rem; background: var(--cui-tertiary-bg); color: var(--cui-secondary-color); position: sticky; top: 0; }
.token-picker__item { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--cui-border-color); background: transparent; padding: .35rem .6rem; font-size: .85rem; color: inherit; }
.token-picker__item:hover, .token-picker__item:focus-visible { background: var(--cui-primary-bg-subtle); outline: none; }
.token-picker__item code { display: block; font-size: .75rem; color: var(--cui-secondary-color); overflow-wrap: anywhere; }

/* Header: counts on the message and alert icons, and the signed-in person's initials */
.header-count { position: absolute; top: 2px; right: -2px; font-size: .62rem; line-height: 1; padding: .22em .45em; }
.avatar-initials {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    background: var(--cui-primary); color: #fff; font-weight: 700; font-size: .8rem;
}

.sidebar-nav .nav-icon {
    text-align: center;
}

.card {
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.code-editor {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .875rem;
    min-height: 28rem;
    tab-size: 4;
    white-space: pre;
}

.token-list code {
    display: inline-block;
    margin: 0 .25rem .25rem 0;
}

.stat {
    font-size: 2rem;
    font-weight: 600;
}

.table td, .table th {
    vertical-align: middle;
}

/* Hidden page components and switched-off settings: still listed, but greyed out */
.component-hidden > td,
.option-off > td { color: var(--cui-secondary-color); }
.component-hidden > td a { opacity: .7; }

/* On/off switch in a table row submits on change (admin.js); the button is the no-JS fallback */
.switch-form { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.switch-form .form-check-input { cursor: pointer; margin: 0; }
.js .switch-form .switch-submit { display: none; }
.option-value { max-width: 20rem; }

/* Errors screen */
.error-message { max-width: 42rem; }
.error-stack { white-space: pre-wrap; word-break: break-word; font-size: .8rem; max-height: 32rem; overflow: auto; }

/* Version history: line-by-line comparison */
.diff { font-size: .8rem; max-height: 28rem; overflow: auto; padding: .5rem 0; background: var(--cui-body-bg); }
.diff-line { display: block; padding: 0 1rem; white-space: pre-wrap; word-break: break-word; }
.diff-mark { display: inline-block; width: 1.25rem; opacity: .6; user-select: none; }
.diff-added { background: rgba(25, 135, 84, .18); }
.diff-removed { background: rgba(220, 53, 69, .18); }
.diff-word { padding: 0 .1rem; border-radius: .2rem; color: inherit; }
.diff-added .diff-word { background: rgba(25, 135, 84, .45); }
.diff-removed .diff-word { background: rgba(220, 53, 69, .45); text-decoration: line-through; }
.diff-key { padding: 0 .35rem; border-radius: .25rem; }
.diff-fold { display: block; padding: .15rem 1rem; color: var(--cui-secondary-color); font-style: italic; }
.diff { white-space: normal; }

/* Media library */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.media-tile { min-width: 0; }
.media-thumb { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden;
    background: var(--cui-tertiary-bg); border: 1px solid var(--cui-border-color); border-radius: .375rem; color: var(--cui-secondary-color); cursor: pointer; }
.media-thumb:hover, .media-thumb:focus-visible { border-color: var(--cui-primary); outline: 0; box-shadow: 0 0 0 .2rem rgba(var(--cui-primary-rgb), .25); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-name { font-size: .85rem; margin-top: .25rem; }
.media-picker-page { background: var(--cui-body-bg); }
.media-dialog { width: min(1000px, 95vw); height: min(720px, 90vh); padding: 0; border: 1px solid var(--cui-border-color); border-radius: .5rem;
    background: var(--cui-body-bg); color: var(--cui-body-color); }
.media-dialog[open] { display: flex; flex-direction: column; }
.media-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.media-dialog__bar { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; border-bottom: 1px solid var(--cui-border-color); }
.media-dialog iframe { flex: 1; width: 100%; border: 0; }
.focus-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.focus-image { max-width: 100%; max-height: 60vh; cursor: crosshair; border-radius: .25rem; }
.focus-marker { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid #fff; border-radius: 50%;
    box-shadow: 0 0 0 2px #d9534f, inset 0 0 0 2px #d9534f; pointer-events: none; }
.crop-stage { max-width: 100%; max-height: 70vh; }
.crop-stage img { display: block; max-width: 100%; }

/* Menu builder */
.menu-children { list-style: none; margin: 0; padding: 0 0 0 1.5rem; }
[data-menu-tree] > .menu-children { padding-left: 0; }
.menu-node { margin-top: .35rem; }
.menu-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--cui-border-color);
    border-radius: .375rem; background: var(--cui-body-bg); position: relative; }
.menu-row--hidden { opacity: .55; }
.menu-handle { cursor: grab; color: var(--cui-secondary-color); }
.menu-label { font-weight: 600; text-decoration: none; white-space: nowrap; }
.menu-href { min-width: 0; font-size: .8rem; color: var(--cui-secondary-color); }
.menu-node--dragging { opacity: .4; }
.menu-row.drop-before { box-shadow: 0 -3px 0 0 var(--cui-primary); }
.menu-row.drop-after { box-shadow: 0 3px 0 0 var(--cui-primary); }
.menu-row.drop-inside { outline: 2px solid var(--cui-primary); background: rgba(var(--cui-primary-rgb), .08); }
.menu-preview ul { margin: 0; padding-left: 1.25rem; }
.menu-preview > ul { padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.menu-preview > ul > li > ul { font-size: .9rem; color: var(--cui-secondary-color); }
@media (max-width: 767.98px) { .menu-href { display: none; } .menu-row { flex-wrap: wrap; } }

/* Events calendar (admin) */
.admin-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--cui-border-color); border: 1px solid var(--cui-border-color); }
.admin-cal__dow { background: var(--cui-tertiary-bg); padding: .25rem .4rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.admin-cal__day { background: var(--cui-body-bg); min-height: 6.5rem; padding: .25rem; min-width: 0; }
.admin-cal__day--other { background: var(--cui-tertiary-bg); }
.admin-cal__day--other .admin-cal__num { opacity: .5; }
.admin-cal__day--today .admin-cal__num { background: var(--cui-primary); color: #fff; border-radius: 1rem; padding: 0 .4rem; }
.admin-cal__num { font-size: .8rem; font-weight: 600; }
.admin-cal__add { opacity: 0; font-size: .75rem; text-decoration: none; }
.admin-cal__day:hover .admin-cal__add, .admin-cal__add:focus { opacity: 1; }
.admin-cal__event { display: block; margin-top: .15rem; padding: .1rem .35rem; font-size: .75rem; line-height: 1.3; border-radius: .25rem; text-decoration: none;
    background: rgba(var(--cui-primary-rgb), .15); color: var(--cui-body-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-cal__event:hover { background: rgba(var(--cui-primary-rgb), .3); }
.admin-cal__event--draft { background: transparent; border: 1px dashed var(--cui-border-color); }
.admin-cal__event--cancelled { text-decoration: line-through; opacity: .6; }
@media (max-width: 767.98px) { .admin-cal__day { min-height: 4rem; } }

/* Sign-in pages: brand panel + form */
.auth { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; min-height: 100vh; }
.auth__brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
    padding: 2.5rem 3rem; color: #fff; background: linear-gradient(150deg, #0b2a38 0%, #12506a 58%, #3b8fa5 100%); }
.auth__brand::before, .auth__brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth__brand::before { width: 26rem; height: 26rem; right: -9rem; bottom: -8rem; background: rgba(255, 255, 255, .06); }
.auth__brand::after { width: 14rem; height: 14rem; left: -5rem; top: 40%; background: rgba(255, 255, 255, .05); }
.auth__logo { position: relative; width: min(100%, 260px); height: auto; }
.auth__pitch { position: relative; }
.auth__eyebrow { margin: 0 0 .35rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.auth__site { margin: 0; font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.auth__host { margin: .6rem 0 0; opacity: .75; }
.auth__foot { position: relative; margin: 0; font-size: .8rem; opacity: .6; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: var(--cui-body-bg); }
.auth__box { width: 100%; max-width: 26rem; }

/* The existing account pages wrap their form in a centred row/col/card: flatten that inside the panel. */
.auth__box .row { display: block; margin: 0; }
.auth__box .row > [class*="col-"] { width: 100%; max-width: none; padding: 0; flex: none; }
.auth__box .card { padding: 0 !important; border: 0; background: transparent; box-shadow: none; }
.auth__box h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; }
.auth__box .form-label { font-weight: 600; font-size: .9rem; }
.auth__box .form-control { padding: .65rem .85rem; }
.auth__box .btn-primary { padding: .7rem 1rem; font-weight: 600; }
.auth__box .input-group .form-control { padding-right: .85rem; }
.auth__hint { display: block; margin-top: .25rem; font-size: .8rem; color: var(--cui-warning-text-emphasis, #997404); }

@media (max-width: 899.98px) {
    .auth { grid-template-columns: 1fr; min-height: 0; }
    .auth__brand { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; gap: 1rem; }
    .auth__logo { width: 150px; }
    .auth__pitch .auth__eyebrow, .auth__host, .auth__foot { display: none; }
    .auth__site { font-size: 1.1rem; text-align: right; }
    .auth__brand::before, .auth__brand::after { display: none; }
    .auth__panel { align-items: flex-start; padding-top: 2rem; }
}

/* User guide: clean white pages, readable type */
.body--white { background: #fff; }
.header.header-sticky { }
.help-landing { max-width: 62rem; margin: 0 auto; padding: 1.5rem 0 3rem; color: #1f2933; }
.help-landing__head { margin-bottom: 2rem; }
.help-landing h1, .help-article h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .5rem; color: #111827; }
.help-lead { font-size: 1.15rem; line-height: 1.6; color: #4b5563; margin: 0 0 1.25rem; max-width: 42rem; }
.help-search { position: relative; max-width: 30rem; }
.help-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.help-search input { width: 100%; padding: .75rem 1rem .75rem 2.5rem; font-size: 1rem; border: 1px solid #d1d5db; border-radius: .6rem; background: #fff; }
.help-search input:focus { outline: 0; border-color: var(--cui-primary); box-shadow: 0 0 0 .2rem rgba(var(--cui-primary-rgb), .18); }
.help-group { margin-top: 2rem; }
.help-group h2 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; margin: 0 0 .75rem; font-weight: 700; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.help-card { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.2rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.help-card:hover, .help-card:focus-visible { border-color: var(--cui-primary); box-shadow: 0 4px 14px rgba(17, 24, 39, .08); transform: translateY(-1px); outline: 0; }
.help-card__icon { font-size: 1.3rem; color: var(--cui-primary); margin-bottom: .3rem; }
.help-card__title { font-weight: 700; font-size: 1.05rem; color: #111827; }
.help-card__text { font-size: .92rem; line-height: 1.5; color: #4b5563; }
.help-none { color: #6b7280; margin-top: 2rem; }

.help { display: grid; grid-template-columns: 15rem minmax(0, 46rem) 13rem; gap: 2.5rem; justify-content: center; padding: 1rem 0 3rem; color: #1f2933; }
.help-nav { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); overflow-y: auto; font-size: .93rem; }
.help-nav summary { display: none; }
.help-nav__home { display: block; margin-bottom: .75rem; font-weight: 700; color: #111827; text-decoration: none; }
.help-nav h2 { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; margin: 1.2rem 0 .35rem; font-weight: 700; }
.help-nav ul { list-style: none; margin: 0; padding: 0; }
.help-nav li a { display: block; padding: .3rem .7rem; margin-left: -.7rem; border-radius: .4rem; color: #374151; text-decoration: none; }
.help-nav li a:hover { background: #f3f4f6; }
.help-nav li a.active { background: rgba(var(--cui-primary-rgb), .1); color: var(--cui-primary); font-weight: 600; }
.help-toc { position: sticky; top: 5rem; align-self: start; font-size: .88rem; }
.help-toc h2 { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; margin: 0 0 .5rem; font-weight: 700; }
.help-toc ul { list-style: none; margin: 0 0 1rem; padding: 0; border-left: 2px solid #e5e7eb; }
.help-toc li a { display: block; padding: .25rem 0 .25rem .8rem; margin-left: -2px; border-left: 2px solid transparent; color: #4b5563; text-decoration: none; }
.help-toc li a:hover, .help-toc li a.active { color: var(--cui-primary); border-left-color: var(--cui-primary); }
.help-print { border: 1px solid #d1d5db; background: #fff; border-radius: .5rem; padding: .4rem .75rem; font-size: .85rem; color: #374151; }
.help-print:hover { border-color: var(--cui-primary); color: var(--cui-primary); }

.help-article { min-width: 0; font-size: 1.05rem; line-height: 1.75; }
.help-crumb { font-size: .85rem; color: #6b7280; margin-bottom: .6rem; }
.help-crumb a { color: inherit; }
.help-article h2 { font-size: 1.45rem; font-weight: 700; color: #111827; margin: 2.6rem 0 .6rem; padding-top: 1.4rem; border-top: 1px solid #e5e7eb; scroll-margin-top: 5rem; }
.help-article h3 { font-size: 1.1rem; font-weight: 700; color: #111827; margin: 1.8rem 0 .4rem; scroll-margin-top: 5rem; }
.help-article p { margin: 0 0 1rem; }
.help-article ul { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.help-article li { margin-bottom: .35rem; }
.help-article code { font-size: .88em; background: #f3f4f6; color: #be185d; padding: .1rem .35rem; border-radius: .3rem; }
.help-article kbd { background: #fff; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: .3rem; padding: .05rem .4rem; font-size: .85em; color: #374151; }
.help-article a { color: var(--cui-primary); }
.help-article table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: .97rem; }
.help-article th, .help-article td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.help-article th { background: #f9fafb; font-weight: 700; color: #111827; }

.help-steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 0 0 1.4rem; }
.help-steps > li { counter-increment: step; position: relative; padding: 0 0 .9rem 3rem; margin: 0; }
.help-steps > li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--cui-primary); color: #fff; font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: center; }
.help-steps > li:not(:last-child)::after { content: ""; position: absolute; left: .97rem; top: 2.3rem; bottom: .2rem; width: 2px; background: #e5e7eb; }

.help-callout { display: flex; gap: .85rem; padding: .9rem 1.1rem; margin: 1.3rem 0; border-radius: .6rem; border: 1px solid; font-size: .98rem; line-height: 1.6; }
.help-callout > i { margin-top: .25rem; font-size: 1.1rem; }
.help-callout strong { display: block; margin-bottom: .15rem; }
.help-callout--tip { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.help-callout--note { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; }
.help-callout--warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.help-callout code { background: rgba(255, 255, 255, .7); }

.help-figure { margin: 1.5rem 0; }
.help-figure img { display: block; max-width: 100%; height: auto; border: 1px solid #e5e7eb; border-radius: .6rem; box-shadow: 0 4px 16px rgba(17, 24, 39, .08); }
.help-figure figcaption { margin-top: .5rem; font-size: .88rem; color: #6b7280; text-align: center; }

.help-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.help-pager__link { display: block; padding: .75rem 1rem; border: 1px solid #e5e7eb; border-radius: .6rem; text-decoration: none !important; color: #111827 !important; font-weight: 600; min-width: 11rem; }
.help-pager__link span { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; font-weight: 600; }
.help-pager__link--next { text-align: right; margin-left: auto; }
.help-pager__link:hover { border-color: var(--cui-primary); }

@media (max-width: 1199.98px) { .help { grid-template-columns: 14rem minmax(0, 1fr); } .help-toc { display: none; } }
@media (max-width: 899.98px) {
    .help { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .help-nav { position: static; max-height: none; border: 1px solid #e5e7eb; border-radius: .6rem; padding: .6rem 1rem; }
    .help-nav summary { display: block; cursor: pointer; font-weight: 700; }
    .help-landing h1, .help-article h1 { font-size: 1.7rem; }
}

@media print {
    .sidebar, .header, .footer, .help-nav, .help-toc, .help-pager, .help-search, #sidebar, .alert { display: none !important; }
    .wrapper { padding: 0 !important; margin: 0 !important; }
    body, .body, .body--white { background: #fff !important; }
    .help { display: block; padding: 0; }
    .help-article { font-size: 11pt; line-height: 1.55; }
    .help-article h2 { break-after: avoid; }
    .help-callout, .help-figure, .help-steps > li { break-inside: avoid; }
    .help-article a { color: #111; text-decoration: none; }
}
.help-card[hidden], .help-group[hidden] { display: none; }
.help-article tbody th { background: transparent; width: 9.5rem; color: #111827; }

/* Search engines and sharing panel */
.seo-panel summary { cursor: pointer; font-weight: 600; }
.seo-preview { max-width: 38rem; padding: .85rem 1rem; border: 1px solid var(--cui-border-color); border-radius: .5rem; background: #fff; }
.seo-preview__url { font-size: .8rem; color: #4d5156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview__title { font-size: 1.15rem; color: #1a0dab; line-height: 1.3; margin: .1rem 0; }
.seo-preview__description { font-size: .88rem; color: #4d5156; line-height: 1.5; }
.seo-count { font-size: .78rem; color: var(--cui-secondary-color); margin-top: .2rem; }
.seo-count--over { color: #b45309; font-weight: 600; }

/* Two-step sign-in code box */
.code-input { letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .2em; }

/* Tabbed content editor */
.edit-tabs .nav-link { cursor: pointer; }
.edit-pane[hidden] { display: none; }
.edit-pane { padding-bottom: 5rem; }
.save-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--cui-body-bg, #fff); border-top: 1px solid var(--cui-border-color, #dee2e6); box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
@media (min-width: 992px) { .sidebar:not(.sidebar-narrow-unfoldable) ~ .wrapper .save-bar { left: var(--cui-sidebar-width, 256px); } }
.save-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .6rem 1rem; max-width: 1400px; }
.save-bar-status { flex: 1 1 12rem; }
.save-bar-note { flex: 1 1 16rem; max-width: 24rem; }
.save-bar-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
body.editor-fullscreen .sidebar, body.editor-fullscreen .header, body.editor-fullscreen nav[aria-label=breadcrumb],
body.editor-fullscreen .edit-tabs { display: none !important; }
body.editor-fullscreen .wrapper { padding-left: 0 !important; }
body.editor-fullscreen .save-bar { left: 0; }
body.editor-fullscreen .jodit-container .jodit-workplace { min-height: 70vh !important; }

/* Dashboard */
.stat-card { flex-direction: row; align-items: center; gap: 1rem; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .75rem; font-size: 1.3rem; flex: none; }
.dash-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: .35rem; display: inline-flex; align-items: center; justify-content: center; }
.dash-thumb-empty { background: var(--cui-tertiary-bg, #f1f3f5); color: var(--cui-secondary-color, #6c757d); }

/* Sidebar groups, notifications and dark theme touches */
.sidebar-nav .nav-group-items .nav-link { font-size: .92rem; }

/* An open group: its title stays bright and its items sit indented under a guide line, so they read as "inside" it. */
.sidebar-nav .nav-group.show > .nav-group-toggle { color: #fff; font-weight: 600; }
.sidebar-nav .nav-group.show > .nav-group-toggle .nav-icon { color: var(--cui-primary, #5b8def); }
.sidebar:not(.sidebar-narrow-unfoldable) .sidebar-nav .nav-group-items.compact {
    margin: .1rem 0 .5rem 1.6rem;
    padding-left: .35rem;
    border-left: 2px solid rgba(255, 255, 255, .12);
}
.sidebar:not(.sidebar-narrow-unfoldable) .sidebar-nav .nav-group-items .nav-link {
    padding: .42rem .75rem .42rem .65rem;
    margin-block: 1px;
    border-radius: .45rem;
    font-size: .9rem;
    gap: .55rem;
}
.sidebar-nav .nav-group-items .nav-icon { width: 1.1rem; font-size: .85rem; opacity: .75; }
.sidebar-nav .nav-group-items .nav-link:hover { background: rgba(255, 255, 255, .07); }
.sidebar-nav .nav-group-items .nav-link.active {
    background: rgba(91, 141, 239, .18);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--cui-primary, #5b8def);
}
.sidebar-nav .nav-group-items .nav-link.active .nav-icon { opacity: 1; color: var(--cui-primary, #5b8def); }
.sidebar-nav .group-badge { font-size: .7rem; }
.sidebar-narrow-unfoldable:not(:hover) .group-badge { display: none; }
.bell-menu { min-width: 17rem; }
[data-coreui-theme="dark"] .seo-preview { color: #202124; }
[data-coreui-theme="dark"] .seo-preview a { color: #1a0dab; }
[data-coreui-theme="dark"] .body--white .container-fluid, [data-coreui-theme="dark"] .body--white .container-lg { color: #1f2933; }
[data-coreui-theme="dark"] .dropdown-item.active { background: var(--cui-primary); color: #fff; }

.colour-swatch { display: inline-block; width: 1rem; height: 1rem; border-radius: .25rem; vertical-align: -.15rem; border: 1px solid var(--cui-border-color); }

/* Header search */
.admin-search { position: relative; width: 18rem; max-width: 30vw; }
.admin-search .form-control { padding-left: 2rem; }
.admin-search__icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--cui-secondary-color, #6c757d); pointer-events: none; font-size: .8rem; }

/* To-do board */
.todo-board { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(220px, 1fr)); overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.todo-col { background: var(--cui-tertiary-bg, #f1f3f5); border-radius: .75rem; padding: .75rem; min-height: 8rem; }
.todo-col__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: .5rem; margin-bottom: .6rem; border-bottom-width: 2px !important; }
.todo-col__cards { min-height: 3rem; display: flex; flex-direction: column; gap: .5rem; }
.todo-col.is-over { outline: 2px dashed var(--cui-primary); outline-offset: -4px; }
.todo-card { background: var(--cui-body-bg, #fff); border: 1px solid var(--cui-border-color); border-radius: .5rem; padding: .6rem .7rem; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.todo-card.is-dragging { opacity: .4; }
.todo-card.is-done .todo-card__title { text-decoration: line-through; color: var(--cui-secondary-color); }
.todo-card__title { display: block; font-weight: 600; color: inherit; text-decoration: none; margin-bottom: .35rem; overflow-wrap: anywhere; }
.todo-card__title:hover { color: var(--cui-primary); }
.todo-card__meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .8rem; }
@media (max-width: 900px) { .todo-board { grid-template-columns: 1fr; } }

/* Page builder */
.pb { display: grid; gap: 1rem; grid-template-columns: 15rem minmax(0, 1fr) minmax(0, 26rem); align-items: start; }
.pb-palette, .pb-side { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow: auto; }
.pb-palette { background: var(--cui-tertiary-bg, #f1f3f5); border-radius: .75rem; padding: .75rem; }
.pb-item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--cui-body-bg, #fff); border: 1px solid var(--cui-border-color); border-radius: .5rem; padding: .35rem .5rem; margin-bottom: .4rem; cursor: grab; font-size: .9rem; }
.pb-region { background: var(--cui-tertiary-bg, #f1f3f5); border: 2px dashed var(--cui-border-color); border-radius: .75rem; padding: .6rem; margin-bottom: 1rem; }
.pb-region.is-over { border-color: var(--cui-primary); background: rgba(var(--cui-primary-rgb), .06); }
.pb-region__head { margin-bottom: .5rem; }
.pb-region__drop { display: flex; flex-direction: column; gap: .5rem; min-height: 1.5rem; }
.pb-region__empty { text-align: center; color: var(--cui-secondary-color); padding: 1rem; }
.pb-card { display: flex; justify-content: space-between; align-items: center; background: var(--cui-body-bg, #fff); border: 1px solid var(--cui-border-color); border-radius: .5rem; padding: .5rem .6rem; cursor: grab; }
.pb-card.is-selected { border-color: var(--cui-primary); box-shadow: 0 0 0 .15rem rgba(var(--cui-primary-rgb), .25); }
.pb-card.is-hidden { opacity: .6; }
.pb-card.is-dragging { opacity: .35; }
.pb-card__main { flex: 1; min-width: 0; cursor: pointer; }
.pb-card__name { font-weight: 600; }
.pb-card__sum { font-size: .8rem; color: var(--cui-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-grip { color: var(--cui-secondary-color); margin-right: .5rem; }
.pb-panel { background: var(--cui-body-bg, #fff); border: 1px solid var(--cui-border-color); border-radius: .75rem; padding: .85rem; margin-bottom: 1rem; }
.pb-preview { background: var(--cui-body-bg, #fff); border: 1px solid var(--cui-border-color); border-radius: .75rem; padding: .6rem; }
.pb-preview iframe { width: 100%; height: 520px; border: 1px solid var(--cui-border-color); border-radius: .4rem; background: #fff; display: block; margin: 0 auto; transition: width .2s; }
@media (max-width: 1200px) { .pb { grid-template-columns: 12rem minmax(0, 1fr); } .pb-side { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 760px) { .pb { grid-template-columns: 1fr; } .pb-palette { position: static; max-height: none; } }

/* ==========================================================================
   Polish pass (Oct 2026): CoreUI, tidied. Links, cards, tables, buttons, badges, forms.
   Colours come from CoreUI's variables, so light and dark themes both follow.
   ========================================================================== */

/* Links: quiet underline that firms up on hover; clear keyboard focus. Buttons, menus and badges are left alone. */
.body a:where(:not(.btn, .nav-link, .dropdown-item, .page-link, .badge, .alert-link, .list-group-item, .media-folders__link, .menu-label)) {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .22em;
    text-decoration-color: rgba(var(--cui-primary-rgb), .35);
    transition: color .12s ease, text-decoration-color .12s ease;
}
.body a:where(:not(.btn, .nav-link, .dropdown-item, .page-link, .badge, .alert-link, .list-group-item, .media-folders__link, .menu-label)):hover {
    text-decoration-color: currentColor;
}
/* In tables a link is usually the row's title: a touch bolder, underline only on hover. */
.table a:where(:not(.btn, .badge, .nav-link)) { font-weight: 500; text-decoration-color: transparent; }
.table a:where(:not(.btn, .badge, .nav-link)):hover { text-decoration-color: currentColor; }
.breadcrumb { font-size: .85rem; }
.breadcrumb a { text-decoration-color: transparent !important; }
.breadcrumb a:hover { text-decoration-color: currentColor !important; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--cui-primary); outline-offset: 2px; border-radius: .25rem; }

/* Headings */
.body h1.h3, .body h1.h4, .body h1.h2 { font-weight: 700; letter-spacing: -.01em; }
.body h2.h5, .body h2.h6 { font-weight: 650; }

/* Cards */
.card {
    border: 1px solid var(--cui-border-color-translucent);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .05);
}
.card-header { background: transparent; font-weight: 600; border-bottom-color: var(--cui-border-color-translucent); padding: .85rem 1.1rem; }
.card-footer { background: transparent; border-top-color: var(--cui-border-color-translucent); }

/* Tables */
.table > thead > tr > th {
    font-size: .72rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
    color: var(--cui-secondary-color); white-space: nowrap; border-bottom: 1px solid var(--cui-border-color);
}
.table > tbody > tr > td { border-color: var(--cui-border-color-translucent); }
.table > tbody > tr:hover > td { background: var(--cui-tertiary-bg); }
.card > .table:first-child > thead th:first-child, .card > .table-responsive:first-child .table > thead th:first-child { border-top-left-radius: .75rem; }
.card > .table:first-child > thead th:last-child, .card > .table-responsive:first-child .table > thead th:last-child { border-top-right-radius: .75rem; }

/* Buttons */
.btn { border-radius: .5rem; font-weight: 500; transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease; }
.btn-sm { border-radius: .4rem; }
.btn-primary:hover, .btn-success:hover { box-shadow: 0 2px 8px rgba(var(--cui-primary-rgb), .3); }
.btn-success:hover { box-shadow: 0 2px 8px rgba(var(--cui-success-rgb), .3); }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-radius: .5rem 0 0 .5rem; }
.btn-group > .btn:last-child { border-radius: 0 .5rem .5rem 0; }
.btn-group-sm > .btn:first-child { border-radius: .4rem 0 0 .4rem; }
.btn-group-sm > .btn:last-child { border-radius: 0 .4rem .4rem 0; }

/* Badges */
.badge { font-weight: 600; letter-spacing: .02em; border-radius: .4rem; }
.badge.rounded-pill { border-radius: 999px; }

/* Forms */
.form-control, .form-select { border-radius: .5rem; }
.form-label { font-weight: 500; font-size: .9rem; }
.form-text, .form-check-label small { color: var(--cui-secondary-color); }
.input-group > .form-control:not(:last-child), .input-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:first-child), .input-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Alerts, menus, tabs, pills */
.alert { border-radius: .6rem; }
.dropdown-menu { border-radius: .6rem; border-color: var(--cui-border-color-translucent); box-shadow: 0 8px 28px rgba(16, 24, 40, .14); padding: .35rem; }
.dropdown-item { border-radius: .4rem; }
.nav-pills .nav-link { border-radius: .5rem; font-weight: 500; }
.nav-tabs .nav-link { font-weight: 500; }
.modal-content { border-radius: .85rem; border-color: var(--cui-border-color-translucent); }

/* Quiet motion for people who ask for it */
@media (prefers-reduced-motion: reduce) { .btn, .body a, .card { transition: none !important; } }
/* Menu builder: who can see each item, on its own row */
.menu-access { width: auto; max-width: 9.5rem; flex-shrink: 0; }
.menu-row--restricted { border-color: var(--cui-warning); background: rgba(var(--cui-warning-rgb), .07); }
.menu-row--restricted .menu-access { border-color: var(--cui-warning); }
@media (max-width: 767.98px) { .menu-access { max-width: 7rem; } }


/* To-do labels: a colour for each label, picked from its name (TodoLabelColours) */
.todo-label--0 { --lc: #3b82f6; } .todo-label--1 { --lc: #10b981; } .todo-label--2 { --lc: #f59e0b; } .todo-label--3 { --lc: #ef4444; }
.todo-label--4 { --lc: #8b5cf6; } .todo-label--5 { --lc: #ec4899; } .todo-label--6 { --lc: #14b8a6; } .todo-label--7 { --lc: #f97316; }
.todo-label { background: color-mix(in srgb, var(--lc, #6b7280) 16%, transparent); color: var(--lc, inherit); border: 1px solid color-mix(in srgb, var(--lc, #6b7280) 45%, transparent); }
.todo-card.has-label { border-left: 4px solid var(--lc); }
.todo-label-chip { --lc: #6b7280; border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent); color: var(--lc); background: transparent; }
.todo-label-chip:hover { background: color-mix(in srgb, var(--lc) 14%, transparent); color: var(--lc); }
.todo-label-chip.is-on { background: var(--lc); color: #fff; }
.todo-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--lc); margin-right: .4rem; }
.todo-label-chip.is-on .todo-dot { background: #fff; }

/* Monitor: the strip of recent checks on a watched site's page (oldest on the left) */
.mon-ticks { display: flex; flex-wrap: wrap; gap: 2px; }
.mon-tick { width: 6px; height: 22px; border-radius: 2px; background: var(--cui-secondary-bg, #ccc); }
.mon-tick--success { background: var(--cui-success, #2eb85c); }
.mon-tick--warning { background: var(--cui-warning, #f9b115); }
.mon-tick--danger { background: var(--cui-danger, #e55353); }
/* Statistics page: charts are inline SVG so they follow the light and dark themes */
.stat-chart { width: 100%; height: auto; display: block; }
.stat-bar { fill: var(--cui-primary, #3d5afe); }
.stat-bar:hover { fill: var(--cui-info, #00b8d4); }
.stat-grid { stroke: var(--cui-border-color, #d8dbe0); stroke-width: 1; }
.stat-axis { fill: var(--cui-secondary-color, #6b7785); font-size: 11px; }
.stat-line { fill: none; stroke: var(--cui-warning, #f9b115); stroke-width: 2; stroke-linejoin: round; }
.stat-key { display: inline-block; vertical-align: middle; margin-right: 5px; }
.stat-key--bar { width: 12px; height: 12px; background: var(--cui-primary, #3d5afe); border-radius: 2px; }
.stat-key--line { width: 16px; height: 0; border-top: 2px solid var(--cui-warning, #f9b115); }
.stat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }