/* Additions on top of Adminator's stylesheet (assets/adminator/style.css, kept unmodified). */

.logo-initial {
    color: #fff;
    display: grid;
    font-family: 'Inter Tight', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    place-items: center;
}

/* Adminator's alert is a grid that starts with a 24px icon column. Without an icon, the text would land in
   that column and wrap after every word, so it takes the whole width instead. */
.alert > .body:first-child {
    grid-column: 1 / -1;
}

p.alert {
    display: block;
}

.alert[hidden] {
    display: none;
}

.alert.flash,
.auth-card .alert {
    margin-bottom: 18px;
}

/* "Remember me" and "Forgot password?" under the password field. */
.auth-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px 16px;
    justify-content: space-between;
    margin: 2px 0 18px;
}

.auth-row a,
.auth-alt a {
    color: var(--primary, #2563eb);
    font-weight: 600;
    text-decoration: none;
}

.auth-row a:hover,
.auth-alt a:hover {
    text-decoration: underline;
}

.auth-alt {
    font-size: 13px;
    margin-top: 16px;
    text-align: center;
}

/* Dark mode's primary colour is light, so white text on it is hard to read. */
.btn--primary {
    color: var(--on-primary, var(--t-inverse));
}

/* Adminator's ".card-head > :last-child" trims the bottom padding for text, and a button there lost it too. */
.card-head > .btn:last-child {
    padding-bottom: 9px;
}

.card-head > .btn--sm:last-child {
    padding-bottom: 6px;
}

.card-head > .btn--lg:last-child {
    padding-bottom: 12px;
}

.card-head:has(> .btn:last-child) {
    align-items: center;
}

/* The sign-in panel follows the branding colours. Its text is worked out to stay readable on them. */
.auth-aside {
    background: linear-gradient(135deg, var(--auth-from, #2563eb), var(--auth-to, #8b5cf6));
    color: var(--auth-on, #fff);
}

.auth-aside .logo-initial {
    color: inherit;
}

.auth-aside-eyebrow,
.auth-aside p {
    color: color-mix(in srgb, currentColor 80%, transparent);
}

.auth-aside-footer {
    color: color-mix(in srgb, currentColor 65%, transparent);
}

.auth-logo {
    display: block;
    height: 40px;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
    width: auto;
}

.auth-card-brand {
    align-items: center;
    color: var(--t-base);
    display: none;
    font-family: 'Inter Tight', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-card-initial {
    background: var(--primary);
    border-radius: 9px;
    color: var(--on-primary, var(--t-inverse));
    height: 36px;
    width: 36px;
}

:root[data-theme="light"] .auth-logo--on-dark,
:root[data-theme="dark"] .auth-logo--on-light {
    display: none;
}

@media (max-width: 900px) {
    .auth-card-brand {
        display: flex;
    }
}

button.avatar {
    border: 0;
    cursor: pointer;
    padding: 0;
}

button.dd-menu-item {
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    text-align: start;
    width: 100%;
}

/* Clear Cache and View Site. Phones show the icons only, with room left for the page title. */
.topbar-form {
    display: flex;
    margin: 0;
}

.topbar-btn {
    margin-inline-end: 4px;
}

.topbar-btn svg {
    flex: none;
    height: 14px;
    width: 14px;
}

.topbar-btn[disabled] {
    cursor: progress;
    opacity: .7;
}

@media (max-width: 720px) {
    .topbar-btn {
        padding: 8px;
    }

    .topbar-btn-label {
        display: none;
    }
}

/* The top bar's bell. The badge grows away from the icon, so "99+" doesn't cover it. */
.dd-notifications .icon-btn .count {
    left: 18px;
    right: auto;
    top: 2px;
}

.dd-notifications .dd-avatar svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    width: 16px;
}

.dd-notifications .dd-row-head strong,
.dd-notifications .dd-preview {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dd-empty {
    color: var(--t-muted);
    font-size: 13px;
    margin: 0;
    padding: 28px 18px;
    text-align: center;
}

.dd-footers {
    display: flex;
}

.dd-footers .dd-footer {
    flex: 1;
}

.dd-footers .dd-footer + .dd-footer {
    border-inline-start: 1px solid var(--border-soft);
}

@media (max-width: 720px) {
    /* The menu is wider than the room left of the bell, so on phones it hangs from the bar itself. */
    .dd-notifications {
        position: static;
    }

    .dd-notifications .icon-btn .count {
        left: 14px;
    }

    .dd-notifications .dd-menu {
        left: 8px;
        min-width: 0;
        right: 8px;
    }
}

@media (max-width: 720px) {
    /* Keep table columns readable on phones; the table scrolls inside its card. */
    .table-scroll .table {
        min-width: 640px;
    }

    /* The closed navigation drawer shouldn't cast a shadow onto the page. */
    body:not(.has-drawer-open) .d-sidebar {
        box-shadow: none;
    }
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.cell-actions {
    text-align: end !important;
    white-space: nowrap;
}

.cell-name a {
    color: inherit;
}

.cell-name a:hover {
    color: var(--primary);
}

.empty-note {
    color: var(--t-muted);
    font-size: 13px;
    padding: 28px 0;
    text-align: center;
}

.empty-note a {
    color: var(--primary);
    font-weight: 600;
}

.list-foot {
    align-items: center;
    border-top: 1px solid var(--border-soft);
    color: var(--t-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 12px;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 18px;
}

.list-foot strong {
    color: var(--t-base);
}

.pager-of {
    margin: 0 4px;
}

a.pager-btn,
span.pager-btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.content-editor {
    min-height: 320px;
}

.list-filters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.list-filters-search {
    flex: 1 1 240px;
    max-width: 360px;
    min-width: 0;
}

.list-filters .fld-select {
    flex: 0 1 180px;
    width: auto;
}

@media (max-width: 600px) {
    .list-filters-search {
        flex-basis: 100%;
        max-width: none;
    }

    .list-filters .fld-select {
        flex: 1 1 140px;
    }
}

.install-steps {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.install-step {
    align-items: center;
    color: var(--t-muted);
    display: flex;
    flex-direction: column;
    font-size: 11.5px;
    font-weight: 600;
    gap: 6px;
    position: relative;
    text-align: center;
}

.install-step:not(:first-child)::before {
    background: var(--border);
    content: "";
    height: 2px;
    inset-inline-end: calc(50% + 18px);
    inset-inline-start: calc(-50% + 16px);
    position: absolute;
    top: 13px;
}

.install-step.is-done:not(:first-child)::before,
.install-step.is-current:not(:first-child)::before {
    background: var(--primary);
}

.install-step-mark {
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    font-size: 12px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.install-step-mark svg {
    fill: none;
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    width: 14px;
}

.install-step.is-current {
    color: var(--t-base);
}

.install-step.is-current .install-step-mark {
    border-color: var(--primary);
    color: var(--primary);
}

.install-step.is-done .install-step-mark {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.install-checks,
.install-needs {
    color: var(--t-base);
    display: flex;
    flex-direction: column;
    font-size: 13.5px;
    gap: 10px;
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}

.install-check {
    align-items: flex-start;
    display: flex;
    gap: 10px;
}

.install-check-mark {
    border-radius: 50%;
    flex: none;
    font-size: 11px;
    font-weight: 700;
    height: 20px;
    line-height: 20px;
    text-align: center;
    width: 20px;
}

.install-check.is-ok .install-check-mark {
    background: var(--success-soft);
    color: var(--success);
}

.install-check.is-warning .install-check-mark {
    background: var(--warning-soft);
    color: var(--warning);
}

.install-check.is-error .install-check-mark {
    background: var(--danger-soft);
    color: var(--danger);
}

.install-needs {
    gap: 6px;
    list-style: disc;
    margin: 10px 0;
    padding-inline-start: 20px;
}

.install-note {
    margin: 0 0 22px;
}

.install-actions {
    align-items: stretch;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.install-actions .auth-submit {
    flex: 1;
    justify-content: center;
    margin-top: 0;
}

.install-actions .auth-submit:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.install-row {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 96px;
}

.manual-config {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    margin: 12px 0 18px;
    min-height: 320px;
    width: 100%;
}

@media (min-width: 1400px) {
    .kpi-grid--five {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.view-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.view-stat {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 12px 16px;
}

.view-stat-label {
    color: var(--t-muted);
    font-size: 12px;
}

.view-stat-value {
    color: var(--t-base);
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    margin-top: 4px;
}

.views-chart {
    margin: 24px 0 0;
    padding: 0 16px 0 24px;
}

.views-plot {
    height: 200px;
    position: relative;
}

.views-plot svg {
    display: block;
    height: 100%;
    overflow: visible;
    position: relative;
    width: 100%;
}

.views-tick {
    border-top: 1px solid var(--border-soft);
    color: var(--t-muted);
    font-size: 11px;
    left: 0;
    line-height: 0;
    position: absolute;
    right: 0;
    text-indent: -20px;
}

.views-area {
    fill: var(--primary-soft);
}

.views-line {
    fill: none;
    stroke: var(--primary);
    stroke-linejoin: round;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.views-days {
    color: var(--t-muted);
    font-size: 11px;
    height: 16px;
    margin-top: 8px;
    position: relative;
}

.views-days span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-list li {
    align-items: center;
    border-top: 1px solid var(--border-soft);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 0;
}

.dash-list li:first-child {
    border-top: 0;
}

.dash-list-main {
    min-width: 0;
}

.dash-list-main strong,
.dash-list-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-list-main strong {
    color: var(--t-base);
    font-size: 13px;
    font-weight: 600;
}

.dash-list-main small {
    color: var(--t-muted);
    font-size: 12px;
}

.dash-list-value {
    color: var(--t-base);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

[hidden] {
    display: none !important;
}

.editor-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.editor-title {
    color: var(--t-base);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

button.tab {
    background: none;
    border-width: 0 0 2px;
    font-family: inherit;
}

.editor-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    /* The sidebar (Save, settings, excerpt) keeps one width, as WordPress does; the content takes the rest. */
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}

.editor-main,
.editor-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.title-card {
    padding: 12px 18px;
}

.title-input {
    background: none;
    border: 0;
    color: var(--t-base);
    font: inherit;
    font-size: 20px;
    font-weight: 600;
    outline: none;
    width: 100%;
}

.title-card:focus-within {
    border-color: var(--primary);
}

.permalink {
    align-items: center;
    color: var(--t-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px;
    padding: 0 4px;
}

.permalink strong {
    color: var(--t-base);
    font-weight: 600;
}

.permalink-view,
.permalink-form {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.permalink-url {
    overflow-wrap: anywhere;
}

.permalink-form .input {
    width: 240px;
}

.blocks-bar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.blocks-title {
    color: var(--t-base);
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.link-button {
    background: none;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
}

.blocks-list,
.rows-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blocks-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--t-muted);
    font-size: 13px;
    margin: 0;
    padding: 28px 16px;
    text-align: center;
}

.block-card {
    border: 1px solid var(--border);
    border-radius: 10px;
}

.block-head {
    align-items: center;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
}

.block-toggle {
    align-items: center;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex: 1;
    font: inherit;
    gap: 10px;
    min-width: 0;
    padding: 4px;
    text-align: start;
}

.block-chevron {
    color: var(--t-muted);
    display: inline-flex;
    flex-shrink: 0;
    transition: transform .16s;
}

.block-chevron svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.block-card.is-open .block-chevron {
    transform: rotate(90deg);
}

.block-badge {
    background: var(--primary-soft);
    border-radius: 6px;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
}

.block-summary {
    color: var(--t-muted);
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.block-move {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--t-muted);
    cursor: pointer;
    flex-shrink: 0;
    height: 32px;
    width: 32px;
}

.block-move:hover:not(:disabled) {
    background: var(--bg-hover);
}

.block-move:disabled {
    cursor: default;
    opacity: .4;
}

.block-body {
    border-top: 1px solid var(--border-soft);
    padding: 16px;
}

.block-add {
    align-items: center;
    background: var(--bg-muted);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
}

.block-add .select {
    flex: 1;
    min-width: 0;
}

.block-add .btn {
    flex-shrink: 0;
}

.row-card {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 12px;
}

.row-card-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rows-list:not(:empty) {
    margin-bottom: 8px;
}

.media-list {
    border: 0;
    margin: 0;
    padding: 0;
}

.media-list .check {
    display: flex;
    margin-top: 8px;
}

.check input:focus-visible + .box {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.span-2 {
    grid-column: span 2;
}

.btn--block {
    justify-content: center;
    width: 100%;
}

.btn--danger-outline {
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn--danger-outline:hover {
    background: var(--danger-soft);
}

.save-dirty {
    color: var(--warning);
    margin: 0;
}

.editor-side .field-help {
    margin: 0;
}

.save-danger {
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
}

.seo-preview {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 14px 16px;
}

.seo-preview-url {
    color: var(--t-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.seo-preview-title {
    color: var(--primary);
    font-size: 17px;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.seo-preview-desc {
    color: var(--t-muted);
    font-size: 13px;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 420px;
    padding: 0;
    width: calc(100% - 32px);
}

.confirm-dialog::backdrop {
    background: rgba(15, 23, 42, .5);
}

@media (max-width: 1100px) {
    .editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .block-body.form-grid,
    .row-card .form-grid,
    .form-grid.span-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .span-2 {
        grid-column: auto;
    }

    .block-head {
        flex-wrap: wrap;
    }

    .block-toggle {
        flex-basis: 100%;
    }

    .block-add {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .view-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.list-foot-info {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.list-foot-size .fld-select {
    width: 96px;
}

.list-foot-size .select {
    font-size: 13px;
}

.salesforce-notice { align-items: flex-start; background: rgba(220, 38, 38, .07); border: 1px solid rgba(220, 38, 38, .3); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 14px 16px; }
.salesforce-notice > svg { fill: none; flex: none; height: 22px; stroke: #dc2626; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 22px; }
.salesforce-notice-body { flex: 1 1 280px; min-width: 0; }
.salesforce-notice-body p { font-size: 13px; margin: 4px 0 6px; }
.salesforce-notice-body code { font-size: 12px; overflow-wrap: anywhere; }
/* The notice's close button (marks the refusal as seen). */
.salesforce-notice-close { margin: 0; }
.salesforce-notice-close button { font-size: 18px; line-height: 1; min-width: 32px; padding-inline: 8px; }

/* WordPress-style counts on list tabs: All (12) | Published (9) | Draft (3) */
.list-count {
    color: var(--t-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

.list-status-tabs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 4px 8px;
    margin-bottom: 12px;
}

.list-status-tab {
    color: var(--t-muted);
    text-decoration: none;
}

.list-status-tab:hover {
    color: var(--t-base);
}

.list-status-tab.is-active {
    color: var(--t-base);
    font-weight: 600;
}

.list-status-sep {
    color: var(--border-soft);
}

/* Post types: gallery fields (assets/js/gallery-field.js) */
.gallery-field .image-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.gallery-tile {
    cursor: grab;
}

.gallery-tile.is-dragging {
    opacity: 0.4;
    outline: 2px dashed var(--accent, #2563eb);
}

.gallery-field.is-busy .image-list-grid {
    opacity: 0.7;
}

.gallery-count {
    color: var(--t-muted, #6b7280);
    font-weight: 400;
}

/* List thumbnails on post-type lists (app/Views/posts/index.php) */
.cell-thumb {
    width: 56px;
}

.post-list-thumb {
    aspect-ratio: 4 / 3;
    background: var(--surface-2, #eef0f3);
    border-radius: 6px;
    display: block;
    object-fit: cover;
    width: 48px;
}

.textarea--code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

/* Sortable column headers on every admin list: sort_th() in app/helpers.php (server side, paginated lists)
   and [data-sort-client] tables in assets/js/table-sort.js (short lists sorted in the browser). */
.sort-link { align-items: center; color: inherit; display: inline-flex; gap: 4px; text-decoration: none; white-space: nowrap; }
.sort-link:hover { color: var(--primary); }
.sort-link .sort-mark { font-size: 10px; opacity: .45; }
.sort-link.is-sorted { color: var(--t-base); font-weight: 600; }
.sort-link.is-sorted .sort-mark { color: var(--primary); opacity: 1; }
button.sort-link { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; padding: 0; text-transform: inherit; }

/* The bell: dismiss buttons, "Dismiss all" */
.dd-head--actions { align-items: center; display: flex; justify-content: space-between; gap: 12px; }
.dd-link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 0; }
.dd-link:hover { text-decoration: underline; }
.dd-entry { position: relative; }
.dd-entry .dd-item { padding-inline-end: 40px; }
.dd-dismiss { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); margin: 0; }
.dd-dismiss button { align-items: center; background: transparent; border: 0; border-radius: 6px; color: var(--t-light); cursor: pointer; display: inline-flex; height: 26px; justify-content: center; opacity: 0; padding: 0; transition: opacity .15s, background-color .15s, color .15s; width: 26px; }
.dd-dismiss button svg { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 14px; }
.dd-entry:hover .dd-dismiss button, .dd-dismiss button:focus-visible { opacity: 1; }
.dd-dismiss button:hover { background: var(--bg-muted); color: var(--danger); }
@media (hover: none) { .dd-dismiss button { opacity: 1; } }
.dd-entry .dd-time { margin-inline-end: 4px; }

/* Notifications page */
.notif-summary { color: var(--t-muted); font-size: 13px; margin: 0 0 12px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-row { align-items: center; border-top: 1px solid var(--border-soft); display: flex; gap: 14px; padding: 14px 0; }
.notif-row:first-child { border-top: 0; }
.notif-row .dd-avatar svg { fill: none; height: 16px; stroke: currentColor; stroke-width: 1.8; width: 16px; }
.notif-body { color: inherit; display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; text-decoration: none; }
.notif-body:hover strong { color: var(--primary); }
.notif-detail { color: var(--t-muted); font-size: 13px; overflow-wrap: anywhere; }
.notif-when { color: var(--t-light); flex: none; font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) { .notif-row { flex-wrap: wrap; } .notif-when { order: 3; width: 100%; padding-inline-start: 50px; } }

/* A list cell with dir="auto" keeps Arabic reading right to left, but stays aligned with its column
   (the admin is left to right), instead of jumping to the cell's right edge. */
.table td[dir="auto"] { text-align: left; }

/* Sidebar brand: the logo alone, no site name. The light or dark file follows the theme. */
.brand--logo-only {
    min-height: 56px;
    text-decoration: none;
}

.brand-logo-img {
    display: block;
    height: 20px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    width: auto;
}

:root[data-theme="light"] .brand-logo-img--on-dark,
:root[data-theme="dark"] .brand-logo-img--on-light {
    display: none;
}

@media (max-width: 1100px) {
    .brand-logo-img {
        height: 20px;
        max-width: 52px;
        object-position: center;
    }
}

/* The agency credit at the foot of the sidebar. */
.agency-credit {
    color: inherit;
    text-decoration: none;
}

.agency-credit:hover {
    background: var(--bg-hover, color-mix(in srgb, var(--primary) 8%, transparent));
}

.agency-credit .workspace-text {
    display: flex;
    flex-direction: column;
}

.agency-credit .workspace-avatar {
    background: #000;
    border-radius: 50%;
    overflow: hidden;
}

.agency-credit .workspace-avatar img {
    display: block;
    height: 20px;
    object-fit: contain;
    width: 20px;
}

.auth-aside-footer a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Phones hide the panel and its footer, so the credit sits under the form there. */
.auth-credit {
    color: var(--t-muted);
    display: none;
    font-size: 12px;
    margin: 28px 0 0;
    text-align: center;
}

.auth-credit a {
    color: inherit;
    font-weight: 600;
}

.auth-aside .auth-logo {
    height: 44px;
    max-width: 220px;
}

@media (max-width: 900px) {
    .auth-credit {
        display: block;
    }
}

/* SEO tab: the card a shared link makes, with the image networks will show (1.91:1, as Facebook and LinkedIn crop). */
.share-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-top: 6px;
    max-width: 520px;
    overflow: hidden;
}

.share-preview-image {
    align-items: center;
    aspect-ratio: 1.91 / 1;
    background: var(--bg-hover);
    color: var(--t-light);
    display: flex;
    font-size: 13px;
    justify-content: center;
}

.share-preview-image img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.share-preview-body {
    border-top: 1px solid var(--border-soft);
    padding: 10px 14px 12px;
}

.share-preview-host {
    color: var(--t-light);
    font-size: 11.5px;
    letter-spacing: .02em;
}

.share-preview-title {
    color: var(--t-base);
    font-size: 15px;
    font-weight: 600;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.share-preview-desc {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--t-muted);
    display: -webkit-box;
    font-size: 13px;
    margin-top: 2px;
    overflow: hidden;
}

.share-preview-wrap [data-share-source] {
    margin-top: 6px;
}

/* Dashboard: three cards side by side, stacked on a tablet or phone. */
.col-4 {
    grid-column: span 4;
    min-width: 0;
}

@media (max-width: 1100px) {
    .col-4 {
        grid-column: span 12;
    }
}

.dash-list-main strong a {
    color: inherit;
    text-decoration: none;
}

.dash-list-main strong a:hover {
    color: var(--primary);
}

/* Breadcrumbs: every crumb is a link. */
.crumbs a.crumb {
    color: inherit;
    text-decoration: none;
}

.crumbs a.crumb:hover {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.crumbs a.crumb.current {
    color: var(--t-base);
    font-weight: 600;
}

/* Navigation > Footer: the footer's parts as tabs inside the card. */
.footer-tabs-bar {
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-tab-panel > .stack:first-child,
.footer-tab-panel > [data-repeater]:first-child {
    margin-top: 4px;
}

/* The slug shown under a title in list tables: quieter than the title, and long slugs wrap. */
.cell-name .data-cell-mono {
    display: inline-block;
    font-weight: 400;
    margin-top: 2px;
    overflow-wrap: anywhere;
}
