:root {
    color-scheme: light;
    --ink: #17151d;
    --muted: #716d7b;
    --line: #e9e6ef;
    --surface: #ffffff;
    --surface-soft: #f7f6fa;
    --canvas: #f2f1f6;
    --purple: #7345e6;
    --purple-dark: #5530b7;
    --purple-soft: #f0eafe;
    --green: #18794e;
    --green-soft: #e8f7ef;
    --red: #b42318;
    --red-soft: #fff0ee;
    --amber: #9a6700;
    --amber-soft: #fff6d8;
    --shadow: 0 14px 40px rgba(30, 21, 51, 0.07);
}

/* Footer management */
.footer-page-heading {
    align-items: flex-end;
    gap: 24px;
}

.footer-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-summary > span {
    border: 1px solid #dfe3eb;
    border-radius: 999px;
    background: #fff;
    color: #4d5565;
    padding: 8px 12px;
    white-space: nowrap;
}

.footer-summary-warning {
    border-color: #f0c882 !important;
    background: #fff8e8 !important;
    color: #875b0a !important;
}

.footer-tabs {
    margin-bottom: 18px;
}

.footer-filter-card {
    margin-bottom: 22px;
}

.footer-filter-form,
.footer-add-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
}

.footer-filter-form .field,
.footer-add-search .field,
.footer-item-form .field {
    margin: 0;
}

.footer-empty-state {
    margin-bottom: 22px;
}

.footer-section-card {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid #e1e4eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(33, 38, 45, 0.04);
}

.footer-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid #e8eaf0;
    background: #fafbfe;
}

.footer-section-heading h2 {
    margin: 3px 0 0;
}

.footer-section-heading > span {
    color: #687082;
    font-size: 0.88rem;
}

.footer-items-list {
    display: grid;
}

.footer-item-card {
    padding: 18px 22px;
    border-bottom: 1px solid #eceef3;
    transition: background-color 0.15s ease;
}

.footer-item-card:last-child {
    border-bottom: 0;
}

.footer-item-card:hover {
    background: #fcfcfe;
}

.footer-item-disabled {
    background: #f8f9fb;
}

.footer-item-not-public {
    box-shadow: inset 4px 0 #e6a23c;
}

.footer-item-form {
    display: grid;
    grid-template-columns: minmax(280px, 1.4fr) minmax(220px, 1fr) 92px minmax(140px, auto);
    gap: 16px;
    align-items: start;
}

.footer-item-identity {
    min-width: 0;
}

.footer-item-identity > strong {
    display: block;
    margin: 8px 0 5px;
    line-height: 1.35;
}

.footer-item-identity > a,
.footer-candidate-row a {
    display: block;
    overflow: hidden;
    color: #6f4acb;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-status-warning {
    display: block;
    margin-top: 7px;
    color: #97630b;
    font-weight: 600;
}

.footer-label-field small {
    display: block;
    margin-top: 5px;
}

.footer-order-field input {
    min-width: 78px;
}

.footer-active-toggle {
    margin-top: 30px;
}

.footer-item-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.button-danger-quiet {
    border-color: transparent;
    background: transparent;
    color: #ad3333;
}

.button-danger-quiet:hover {
    border-color: #efc4c4;
    background: #fff2f2;
}

.footer-add-card {
    margin-top: 26px;
}

.footer-add-search {
    grid-template-columns: 220px minmax(280px, 1fr) auto;
}

.footer-candidate-list {
    display: grid;
    margin-top: 18px;
    border: 1px solid #e5e7ed;
    border-radius: 10px;
}

.footer-candidate-row {
    display: grid;
    grid-template-columns: 112px minmax(240px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-bottom: 1px solid #eceef3;
}

.footer-candidate-row:last-child {
    border-bottom: 0;
}

.footer-candidate-row strong {
    display: block;
    margin-bottom: 3px;
}

.footer-form-checkbox,
.deals-footer-option {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e6e8ee;
}

@media (max-width: 1100px) {
    .footer-item-form {
        grid-template-columns: minmax(260px, 1fr) minmax(220px, 1fr) 90px;
    }

    .footer-active-toggle {
        grid-column: 1 / -1;
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .footer-page-heading,
    .footer-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-summary {
        justify-content: flex-start;
    }

    .footer-filter-form,
    .footer-add-search,
    .footer-item-form,
    .footer-candidate-row {
        grid-template-columns: 1fr;
    }

    .footer-item-card,
    .footer-section-heading {
        padding: 17px;
    }

    .footer-active-toggle,
    .footer-item-actions {
        grid-column: 1;
    }

    .footer-item-actions .button {
        flex: 1 1 140px;
    }
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--canvas);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 20px 22px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 4%, rgba(151, 112, 255, 0.34), transparent 28%),
        linear-gradient(168deg, #211a31 0%, #17131f 72%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 6px solid #a584ff;
    border-radius: 50%;
    font-size: 0;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.brand-word {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-admin {
    align-self: flex-end;
    margin-bottom: 6px;
    color: #bcb4c9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-nav {
    margin-top: 44px;
    display: grid;
    gap: 7px;
}

.nav-group-label {
    margin: 0 12px 7px;
    color: #827a90;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-divider {
    height: 1px;
    margin: 12px 12px 10px;
    background: rgba(255, 255, 255, 0.11);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 13px;
    border-radius: 10px;
    color: #cfc9d7;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.nav-link.active {
    color: #fff;
    background: rgba(124, 78, 234, 0.3);
    box-shadow: inset 3px 0 0 #a584ff;
}

.nav-link-disabled {
    opacity: 0.5;
    cursor: default;
}

.nav-link small {
    color: #bdaaff;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    padding: 17px 13px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 3px;
    color: #c6c0ce;
    font-size: 12px;
}

.sidebar-footer small {
    color: #777080;
}

.workspace {
    min-width: 0;
}

.topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}

.topbar > div {
    display: grid;
    gap: 2px;
}

.topbar-context {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar strong {
    font-size: 14px;
}

.site-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid #d8cfef;
    border-radius: 9px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 120ms ease, background 120ms ease;
}

.site-link:hover {
    border-color: #bda9ee;
    background: #e7ddfc;
}

.main-content {
    width: min(1460px, 100%);
    margin: 0 auto;
    padding: 42px 40px 64px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.page-heading p {
    max-width: 690px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.page-heading-form {
    margin-bottom: 24px;
}

.eyebrow {
    color: var(--purple);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 780;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: var(--purple);
    box-shadow: 0 8px 18px rgba(115, 69, 230, 0.22);
}

.button-primary:hover {
    background: var(--purple-dark);
}

.button-secondary {
    color: var(--ink);
    border-color: var(--line);
    background: var(--surface);
}

.button-block {
    width: 100%;
}

.ai-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 21px 23px;
    border: 1px solid var(--line);
    border-left: 4px solid;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(34, 24, 57, 0.035);
}

.ai-status-ready {
    border-left-color: var(--green);
}

.ai-status-missing {
    border-left-color: var(--amber);
}

.ai-status-card > div {
    display: grid;
    gap: 5px;
}

.ai-status-card strong {
    font-size: 17px;
}

.ai-status-card small,
.ai-status-card dt {
    color: var(--muted);
    font-size: 10px;
}

.ai-status-card dl {
    min-width: 210px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
}

.ai-status-card dd {
    margin: 0;
    color: #4f4858;
    font-size: 11px;
    font-weight: 750;
    text-align: right;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.prompt-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.prompt-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prompt-card-topline time {
    color: #9a95a0;
    font-size: 9px;
}

.prompt-card h2 {
    margin: 7px 0 9px;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.prompt-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.prompt-card .button {
    margin-top: auto;
}

.prompt-global-note {
    margin-top: 18px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    min-height: 126px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    gap: 5px 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(34, 24, 57, 0.035);
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-card strong {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.metric-card small {
    align-self: end;
    color: #9a96a2;
    font-size: 12px;
}

.panel,
.form-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel {
    overflow: hidden;
}

.panel-toolbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: #fcfbfd;
}

.search-field {
    flex: 1;
}

.search-field input,
.filter-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #ded9e7;
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.search-field input {
    padding: 0 14px;
}

.filter-field {
    width: 180px;
}

.filter-field select {
    padding: 0 36px 0 12px;
}

.search-field input:focus,
.filter-field select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #9c7cec;
    box-shadow: 0 0 0 3px rgba(115, 69, 230, 0.11);
}

.table-wrap {
    overflow-x: auto;
}

.redirect-table {
    min-width: 820px;
}

.redirect-table code {
    color: #4e4658;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.redirect-form-card {
    max-width: 820px;
    display: grid;
    gap: 22px;
}

.redirect-form-actions {
    max-width: 820px;
    grid-template-columns: max-content max-content;
    justify-content: start;
}

.category-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.page-table {
    min-width: 980px;
}

.page-group-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 18px 14px;
}

.page-group-heading-separated {
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.page-group-heading h2 {
    margin: 3px 0 0;
    font-size: 20px;
    letter-spacing: -0.025em;
}

.page-group-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
}

.page-name-cell {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.robots-value {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    white-space: nowrap;
}

.robots-noindex {
    color: var(--amber);
}

.category-table th {
    padding: 13px 16px;
    color: #8a8592;
    background: #faf9fb;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.category-table td {
    padding: 16px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
    font-size: 13px;
}

.category-row:hover td {
    background: #fcfbfe;
}

.category-row-child td:first-child {
    background-image: linear-gradient(90deg, rgba(115, 69, 230, 0.025), transparent 68%);
}

.category-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: calc(var(--tree-depth) * 26px);
}

.tree-branch {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-left: 1px solid #c8bfda;
    border-bottom: 1px solid #c8bfda;
    border-bottom-left-radius: 7px;
    transform: translateY(-5px);
}

.category-name-cell > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.category-name {
    width: fit-content;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.category-name:hover {
    color: var(--purple-dark);
}

.category-page-title {
    max-width: 330px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-url {
    color: #4e4658;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    text-decoration: none;
}

.public-url:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

.redirect-detail {
    display: block;
    max-width: 220px;
    margin-top: 5px;
    overflow: hidden;
    color: var(--amber);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.status-active {
    color: var(--green);
    background: var(--green-soft);
}

.status-published {
    color: var(--green);
    background: var(--green-soft);
}

.status-disabled {
    color: #6b6571;
    background: #efedf1;
}

.status-draft {
    color: #6b6571;
    background: #efedf1;
}

.status-redirect {
    color: var(--amber);
    background: var(--amber-soft);
}

.order-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-value {
    width: 24px;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.order-controls form {
    margin: 0;
}

.icon-button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: #514b59;
    background: #fff;
    cursor: pointer;
}

.icon-button:hover:not(:disabled) {
    color: var(--purple-dark);
    border-color: #b7a3e9;
}

.icon-button:disabled {
    opacity: 0.3;
    cursor: default;
}

.date-value,
.utc-label {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.utc-label {
    color: #aaa5b0;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    white-space: nowrap;
}

.text-action {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.text-action:hover,
.text-action-strong {
    color: var(--purple-dark);
}

.text-action-danger,
.text-action-danger:hover {
    color: var(--red);
}

.row-actions form {
    margin: 0;
}

.row-actions button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.empty-panel,
.filter-empty {
    padding: 60px 24px;
    text-align: center;
}

.empty-panel h1,
.empty-panel h2 {
    margin: 8px 0;
}

.empty-panel p,
.filter-empty {
    color: var(--muted);
}

.filter-empty {
    padding: 30px;
}

.notice {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
}

.notice-success {
    color: var(--green);
    border-color: #b9e3cd;
    background: var(--green-soft);
}

.notice-error,
.validation-summary {
    color: var(--red);
    border-color: #f1c2bd;
    background: var(--red-soft);
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumbs a {
    color: var(--purple-dark);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 18px;
}

.editor-main {
    display: grid;
    gap: 18px;
}

.form-card {
    padding: 26px;
}

.form-card-heading {
    display: flex;
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--line);
}

.form-card h2 {
    margin: 0 0 5px;
    font-size: 18px;
    letter-spacing: -0.025em;
}

.form-card-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.step-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 9px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 10px;
    font-weight: 850;
}

.field-grid {
    display: grid;
    gap: 18px;
}

.field-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid + .field-grid,
.field-grid + .field,
.field + .field,
.field + .advanced-fields {
    margin-top: 20px;
}

.field label,
.label-row label {
    display: block;
    margin-bottom: 8px;
    color: #3e3944;
    font-size: 12px;
    font-weight: 780;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dcd7e3;
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.field textarea {
    display: block;
    min-height: 110px;
    line-height: 1.55;
    resize: vertical;
}

.field small {
    display: block;
    margin-top: 7px;
    color: #8b8692;
    font-size: 10px;
    line-height: 1.45;
}

.field small strong {
    color: #625b6c;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.field-error {
    display: block;
    margin-top: 5px;
    color: var(--red);
    font-size: 11px;
    font-weight: 650;
}

.input-validation-error {
    border-color: #da8177 !important;
    background: #fffafa !important;
}

.validation-summary {
    display: none;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 12px;
}

.validation-summary.validation-summary-errors {
    display: block;
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.url-input {
    display: flex;
    align-items: stretch;
    border: 1px solid #dcd7e3;
    border-radius: 9px;
    overflow: hidden;
    background: #faf9fb;
}

.url-input:focus-within {
    border-color: #9c7cec;
    box-shadow: 0 0 0 3px rgba(115, 69, 230, 0.11);
}

.url-input span {
    display: flex;
    align-items: center;
    padding: 0 11px;
    color: #8a8491;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    white-space: nowrap;
}

.url-input input {
    min-width: 120px;
    border: 0;
    border-right: 1px solid #e5e1e9;
    border-left: 1px solid #e5e1e9;
    border-radius: 0;
    box-shadow: none !important;
}

.inline-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid #a78ae9;
    color: #675e73;
    background: #f8f5ff;
    font-size: 11px;
    line-height: 1.5;
}

.readonly-value {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #5f5868;
    background: var(--surface-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.character-count {
    color: #98929e;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.character-count.guidance-warning {
    color: var(--amber);
    font-weight: 750;
}

.advanced-fields {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.advanced-fields summary {
    color: var(--purple-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
}

.advanced-fields .field {
    margin-top: 16px;
}

.form-card-sticky {
    position: sticky;
    top: 18px;
}

.prompt-editor-layout {
    grid-template-columns: minmax(0, 1fr) 370px;
}

.prompt-textarea {
    min-height: 650px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.65 !important;
    tab-size: 4;
}

.prompt-history-card {
    margin-top: 18px;
}

.prompt-history-card > h2 {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.prompt-history-empty {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.prompt-history-list {
    display: grid;
}

.prompt-history-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.prompt-history-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.prompt-history-item > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.prompt-history-item strong {
    font-size: 11px;
}

.prompt-history-item time {
    color: #9b96a1;
    font-size: 8px;
}

.prompt-history-item p {
    display: -webkit-box;
    margin: 9px 0 11px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.prompt-history-item button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.prompt-history-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.form-card-sticky > h2 {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.status-options {
    display: grid;
    gap: 9px;
    margin-top: 17px;
}

.status-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.status-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-option span {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.status-option strong {
    font-size: 12px;
}

.status-option small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.status-option input:checked + span {
    border-color: #9c7cec;
    background: var(--purple-soft);
    box-shadow: inset 3px 0 0 var(--purple);
}

.status-option input:focus-visible + span {
    outline: 3px solid rgba(115, 69, 230, 0.18);
}

.redirect-field {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.publishing-options {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.checkbox-option {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 9px;
    color: #4d4655;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.45;
}

.checkbox-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--purple);
}

.legal-date-field {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.redirect-field[hidden] {
    display: none;
}

.publish-actions {
    display: grid;
    gap: 9px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.system-dates {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.system-dates div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.system-dates dt,
.system-dates dd {
    margin: 0;
    color: #8d8794;
    font-size: 9px;
}

.system-dates dd {
    color: #5c5563;
    text-align: right;
}

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

/* Bulk offer import */
.bulk-import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 18px;
}

.bulk-offer-source {
    min-height: 560px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.65 !important;
}

.bulk-import-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.bulk-import-preview .form-card-heading {
    margin-bottom: 20px;
}

.bulk-preview-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.bulk-preview-counts > div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.bulk-preview-counts span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.bulk-preview-counts strong {
    font-size: 28px;
    line-height: 1;
}

.bulk-import-preview .inline-note {
    margin: 16px 0 0;
}

.bulk-preview-message-warning {
    color: var(--amber);
    border-left-color: var(--amber);
    background: var(--amber-soft);
}

.bulk-preview-list {
    display: grid;
    gap: 0;
    max-height: 440px;
    margin: 16px 0 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.bulk-preview-list li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 9px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.bulk-preview-list li > span {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 9px;
    font-weight: 850;
}

.bulk-preview-list li > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.bulk-preview-list strong,
.bulk-preview-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-preview-list strong {
    font-size: 11px;
}

.bulk-preview-list small {
    color: var(--muted);
    font-size: 9px;
}

.bulk-preview-list .bulk-preview-warning small {
    color: var(--amber);
}

.bulk-preview-list .bulk-preview-more {
    display: block;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.bulk-import-result {
    margin-bottom: 18px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.bulk-import-result-summary {
    display: flex;
    align-items: center;
    gap: 9px;
}

.bulk-import-result-summary p {
    margin: 0 0 0 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.bulk-import-result-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.bulk-import-result-item {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.bulk-import-result-item > span {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--surface-soft);
    font-size: 9px;
    font-weight: 850;
}

.bulk-import-result-item > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.bulk-import-result-item a,
.bulk-import-result-item strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-import-result-item a {
    color: var(--purple-dark);
    text-decoration: none;
}

.bulk-import-result-item small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.bulk-result-success {
    border-color: #cde6d8;
    background: #fbfffd;
}

.bulk-result-error {
    border-color: #f0cbc6;
    background: #fffafa;
}

.bulk-result-error small {
    color: var(--red);
}

@media (max-width: 1120px) {
    .admin-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .prompt-editor-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .prompt-grid {
        grid-template-columns: 1fr;
    }

    .prompt-card {
        min-height: 220px;
    }

    .main-content,
    .topbar {
        padding-right: 26px;
        padding-left: 26px;
    }

    .field-grid-two {
        grid-template-columns: 1fr;
    }

    .bulk-import-layout {
        grid-template-columns: minmax(0, 1fr) 310px;
    }
}

@media (max-width: 820px) {
    .admin-shell {
        display: block;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 16px 20px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar-nav {
        margin: 0;
        display: flex;
    }

    .nav-group-label,
    .nav-divider,
    .nav-link-disabled,
    .sidebar-footer,
    .brand-admin {
        display: none;
    }

    .nav-link {
        min-height: 38px;
    }

    .topbar {
        height: 62px;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .ai-status-card {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-status-card dl {
        min-width: 0;
    }

    .form-card-sticky {
        position: static;
    }

    .bulk-import-layout,
    .bulk-import-result-list {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 100px;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 28px 16px 48px;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar > div,
    .site-link {
        font-size: 11px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
    }

    .panel-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .page-group-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .page-group-heading p {
        text-align: left;
    }

    .filter-field {
        width: 100%;
    }

    .form-card {
        padding: 20px 17px;
    }

    .bulk-import-result-summary,
    .bulk-import-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-import-result-summary p {
        margin-left: 0;
    }

    .url-input span:first-child {
        display: none;
    }

    .url-input input {
        border-left: 0;
    }
}

/* Articles */
.topbar-actions,
.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.article-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.article-review-metric-due {
    border-color: #efb8b8;
    background: #fff8f8;
}

.article-review-metric-due strong {
    color: var(--red);
}

.content-type-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.content-type-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.content-type-tab span {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #696271;
    background: var(--surface-soft);
    font-size: 9px;
    text-align: center;
}

.content-type-tab.active {
    color: var(--purple-dark);
    border-color: #bda9ee;
    background: var(--purple-soft);
}

.content-type-tab.active span {
    color: #fff;
    background: var(--purple);
}

.article-filter-toolbar {
    grid-template-columns: minmax(260px, 1fr) 220px 180px auto auto;
}

.article-table {
    min-width: 1240px;
}

.article-table th:first-child {
    width: 32%;
}

.article-category-name,
.article-category-empty {
    font-size: 11px;
    font-weight: 700;
}

.article-category-stack {
    display: grid;
    gap: 3px;
}

.article-category-stack small {
    color: var(--muted);
    font-size: 9px;
}

.article-category-empty {
    color: var(--muted);
    font-weight: 600;
}

.article-row-review-overdue > td {
    background: #fff8f8;
}

.article-row-review-today > td {
    background: #fffaf0;
}

.article-row-review-overdue:hover > td {
    background: #fff3f3;
}

.article-row-review-today:hover > td {
    background: #fff6e5;
}

.article-attention {
    min-width: 138px;
    display: grid;
    justify-items: start;
    gap: 4px;
}

.article-attention small,
.article-attention-empty {
    color: var(--muted);
    font-size: 9px;
}

.review-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.review-badge-overdue {
    color: var(--red);
    background: #ffe4e4;
}

.review-badge-today,
.review-badge-soon {
    color: #8b4f00;
    background: #fff0d5;
}

.review-badge-upcoming {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.review-badge-none {
    color: #6b6571;
    background: #efedf1;
}

.article-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.article-type-deals {
    color: #8b4f00;
    background: #fff0d5;
}

.article-type-regular {
    color: #4e3592;
    background: var(--purple-soft);
}

.article-view-count {
    display: grid;
    gap: 2px;
}

.article-view-count strong {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.article-view-count span,
.article-view-count small {
    color: var(--muted);
    font-size: 9px;
}

.article-form-heading {
    align-items: center;
}

.article-heading-actions {
    width: min(360px, 100%);
    display: grid;
    justify-items: end;
    gap: 12px;
}

.article-heading-actions > .article-type-badge {
    min-height: 34px;
    padding: 0 14px;
    font-size: 10px;
}

.article-category-pin-option.is-disabled {
    opacity: 0.58;
}

.article-category-pin-option.is-disabled .checkbox-option {
    cursor: not-allowed;
}

.article-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
}

.article-editor-aside {
    display: grid;
    align-self: stretch;
    gap: 18px;
}

.article-publishing-card > h2 {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.article-category-field {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.article-additional-category-label {
    margin-top: 16px;
}

.article-tag-field {
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.article-tag-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.article-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 30px;
    margin-top: 10px;
}

.article-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px 5px 10px;
    border: 1px solid #d8cdf5;
    border-radius: 999px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 10px;
    font-weight: 750;
}

.article-tag-chip button {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--purple-dark);
    background: rgba(115, 69, 230, 0.12);
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.article-tag-empty {
    align-self: center;
    color: var(--muted);
    font-size: 10px;
}

.article-offer-picker {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fcfbfd;
}

.article-offer-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.article-offer-picker-heading h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.article-offer-picker-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.article-offer-picker-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin-top: 15px;
}

.article-offer-picker-action {
    display: flex;
    align-items: flex-end;
}

.article-offer-picker-action .button {
    min-height: 44px;
    white-space: nowrap;
}

.article-offer-picker-status {
    min-height: 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.article-offer-picker-working {
    color: #365a9d;
}

.article-offer-picker-success {
    color: var(--green);
}

.article-offer-picker-error {
    color: var(--red);
}

.article-offer-results-panel {
    margin-top: 12px;
}

.article-offer-results-toolbar {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
}

.article-offer-results {
    max-height: 360px;
    overflow: auto;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.article-offer-result {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.article-offer-result:last-child {
    border-bottom: 0;
}

.article-offer-result:hover {
    background: var(--surface-soft);
}

.article-offer-result > input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--purple);
}

.article-offer-result-content {
    display: grid;
    gap: 4px;
}

.article-offer-result-content strong {
    color: #3e3944;
    font-size: 11px;
    line-height: 1.4;
}

.article-offer-result-meta {
    color: var(--muted);
    font-size: 9px;
}

.deals-relevance-fields {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.deals-relevance-fields h3 {
    margin: 0 0 14px;
    font-size: 13px;
}

.article-source-editor,
.article-html-editor {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6 !important;
    tab-size: 4;
}

.article-html-editor {
    min-height: 660px !important;
    white-space: pre;
    overflow: auto;
}

.article-preview-card {
    position: sticky;
    top: 18px;
    padding: 18px;
}

.article-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.article-preview-heading h2 {
    margin: 3px 0 0;
}

.article-preview-heading > span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 9px;
    font-weight: 800;
}

#article-live-preview {
    width: 100%;
    height: 680px;
    display: block;
    border: 1px solid #dcd7e3;
    border-radius: 10px;
    background: #fff;
}

.article-statistics {
    display: grid;
    gap: 9px;
    margin: 20px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
}

.article-statistics > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.article-statistics dt,
.article-statistics dd {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.article-statistics dd {
    color: #4f4858;
    font-weight: 750;
    text-align: right;
}

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

@media (max-width: 1120px) {
    .article-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-editor-layout {
        grid-template-columns: 1fr;
    }

    .article-preview-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .article-page-heading .page-heading-actions {
        width: 100%;
    }

    .article-page-heading .button {
        flex: 1;
    }

    .article-filter-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .article-metric-grid {
        grid-template-columns: 1fr;
    }

    .content-type-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .content-type-tab {
        justify-content: space-between;
    }

    .page-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #article-live-preview {
        height: 560px;
    }

    .article-tag-editor,
    .article-offer-picker-filters {
        grid-template-columns: 1fr;
    }

    .article-tag-editor .button,
    .article-offer-picker-action .button,
    #add-source-offers {
        width: 100%;
    }
}

/* Offers */
.metric-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid-five .metric-card {
    min-height: 112px;
    padding: 18px;
}

.metric-grid-five .metric-card strong {
    font-size: 34px;
}

.offer-filter-toolbar {
    flex-wrap: wrap;
}

.offer-category-filter {
    width: 250px;
}

.offer-table {
    min-width: 1320px;
}

.offer-availability-column {
    width: 1%;
    white-space: nowrap;
}

.offer-summary-cell {
    min-width: 380px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.offer-list-image {
    width: 72px;
    height: 60px;
    flex: 0 0 72px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f5fa;
}

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

.offer-list-image:hover {
    border-color: #b9a7e8;
}

.offer-name-cell {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.offer-identifiers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: #9a95a0;
    font-size: 9px;
}

.offer-sponsor-id {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-target {
    max-width: 310px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-target:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

.offer-badge-stack {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.offer-click-counts {
    min-width: 118px;
    display: grid;
    gap: 2px;
}

.offer-click-counts strong {
    color: var(--purple-dark);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.offer-click-counts span,
.offer-click-counts small,
.offer-click-counts time {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.offer-click-counts small,
.offer-click-counts time {
    display: block;
}

.status-scheduled {
    color: #365a9d;
    background: #eaf1ff;
}

.status-expired {
    color: var(--amber);
    background: var(--amber-soft);
}

.status-incomplete {
    color: var(--red);
    background: var(--red-soft);
}

.status-still-available {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.status-recommended {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.offer-original-date {
    display: block;
    margin-top: 4px;
    color: #a29da7;
    font-size: 9px;
}

.pagination-bar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.pagination-bar > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offer-form-heading {
    align-items: center;
}

.offer-form-heading form {
    margin: 0;
}

.still-available-action {
    width: min(330px, 100%);
    display: grid;
    justify-items: end;
    gap: 7px;
    text-align: right;
}

.still-available-action small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.offer-editor-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
}

.offer-tracking-card {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.offer-tracking-card h3 {
    margin: 0 0 14px;
    font-size: 13px;
}

.offer-tracking-card .readonly-value {
    overflow-wrap: anywhere;
}

.offer-click-breakdown {
    display: grid;
    gap: 7px;
    margin: 14px 0 0;
}

.offer-click-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.offer-click-breakdown dt,
.offer-click-breakdown dd {
    margin: 0;
    font-size: 10px;
}

.offer-click-breakdown dt {
    color: var(--muted);
}

.offer-click-breakdown dd {
    color: #4f4858;
    font-weight: 750;
    text-align: right;
}

.category-selection-field {
    gap: 10px;
}

.category-picker-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-picker-heading > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.category-picker-heading strong,
.additional-category-slot-heading strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
}

.category-picker-heading span,
.additional-category-slot-heading span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.linked-category-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.category-selection-field > .linked-category-picker {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfbfd;
}

.linked-category-control {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.linked-category-control label {
    margin: 0;
    color: #4f4858;
    font-size: 10px;
    font-weight: 800;
}

.linked-category-control small {
    min-height: 28px;
}

.linked-category-control select:disabled {
    color: #9b96a1;
    background: var(--surface-soft);
    cursor: not-allowed;
}

.additional-category-slots {
    display: grid;
    gap: 10px;
}

.additional-category-slot {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfbfd;
}

.additional-category-slot-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.offer-image-layout {
    display: grid;
    grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.offer-image-preview {
    aspect-ratio: 6 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

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

.offer-image-empty {
    display: grid;
    place-items: center;
    border-style: dashed;
    color: #9b96a1;
    font-size: 11px;
}

.form-card-heading-actions {
    align-items: center;
}

.form-card-heading-actions > div {
    flex: 1;
}

.ai-generate-button {
    flex: 0 0 auto;
}

.ai-generate-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.ai-generation-status {
    margin: -10px 0 22px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 10px;
    line-height: 1.45;
}

.ai-generation-working {
    color: #365a9d;
    border-color: #bfd0f1;
    background: #eef4ff;
}

.ai-generation-success {
    color: var(--green);
    border-color: #b9e3cd;
    background: var(--green-soft);
}

.ai-generation-error {
    color: var(--red);
    border-color: #f1c2bd;
    background: var(--red-soft);
}

.url-check-result {
    display: block;
    min-height: 16px;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 650;
}

.url-check-pending {
    color: var(--muted);
}

.url-check-available {
    color: var(--green);
}

.url-check-duplicate {
    color: var(--red);
}

.lifecycle-date-field {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.lifecycle-date-field[hidden] {
    display: none;
}

.publication-requirements {
    margin-top: 18px;
}

.affiliate-rule-note {
    margin-bottom: 18px;
}

.affiliate-rule-table {
    min-width: 1180px;
}

.affiliate-rule-table th:first-child {
    width: 31%;
}

.affiliate-rule-name {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.affiliate-rule-name code,
.affiliate-rule-name small {
    max-width: 420px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affiliate-domain,
.affiliate-encoding {
    color: #514b59;
    font-size: 11px;
    white-space: nowrap;
}

.affiliate-link-count {
    display: block;
    width: fit-content;
    color: var(--purple-dark);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    text-decoration: none;
}

.affiliate-link-count:hover {
    text-decoration: underline;
}

.affiliate-count-detail {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.affiliate-fallback-summary {
    color: var(--purple-dark) !important;
}

.affiliate-rule-editor-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.affiliate-template-editor {
    min-height: 128px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.55 !important;
}

.affiliate-active-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin: 16px 0 20px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    cursor: pointer;
}

.affiliate-active-option input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--purple);
}

.affiliate-active-option span {
    display: grid;
    gap: 3px;
}

.affiliate-active-option strong {
    font-size: 13px;
}

.affiliate-active-option small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.affiliate-automation-note {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(130px, 1fr);
    align-items: center;
    gap: 8px;
    padding: 13px;
    border: 1px solid #d8cdf5;
    border-radius: 10px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 10px;
}

.affiliate-automation-note > span:first-child {
    color: var(--muted);
    font-weight: 750;
}

.affiliate-links-empty {
    margin-top: 14px;
    padding: 18px;
    border: 1px dashed #d5d0dc;
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 11px;
    text-align: center;
}

.article-affiliate-links {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.article-affiliate-link {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfbfd;
}

.article-affiliate-link-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.article-affiliate-link-heading > a {
    overflow: hidden;
    color: var(--purple-dark);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-affiliate-link dl {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
}

.article-affiliate-link dl > div {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);
    gap: 10px;
}

.article-affiliate-link dt {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.article-affiliate-link dd {
    min-width: 0;
    margin: 0;
}

.article-affiliate-link code {
    display: block;
    overflow-wrap: anywhere;
    color: #4e4856;
    font-size: 9px;
    line-height: 1.45;
}

.affiliate-rules-link {
    margin-top: 14px;
}

.affiliate-links-panel {
    margin-top: 18px;
}

.affiliate-links-heading {
    align-items: center;
}

.affiliate-link-toolbar {
    flex-wrap: wrap;
}

.affiliate-link-rule-filter {
    width: 240px;
}

.affiliate-link-toolbar .text-action {
    padding: 0 4px;
}

.affiliate-link-table {
    min-width: 1180px;
}

.affiliate-link-table th:nth-child(2) {
    width: 32%;
}

.affiliate-short-url,
.affiliate-link-rule-name {
    display: block;
    width: fit-content;
    color: var(--purple-dark);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.affiliate-short-url {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.affiliate-short-url:hover,
.affiliate-link-rule-name:hover {
    text-decoration: underline;
}

.affiliate-short-url + small,
.affiliate-link-fallback {
    display: block;
    max-width: 260px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affiliate-original-url {
    display: block;
    max-width: 420px;
    overflow: hidden;
    color: #514b59;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1260px) {
    .metric-grid-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .offer-image-layout {
        grid-template-columns: 1fr;
    }

    .affiliate-rule-editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .affiliate-automation-note {
        grid-template-columns: 1fr;
    }

    .affiliate-automation-note > span[aria-hidden="true"] {
        display: none;
    }
}

@media (max-width: 820px) {
    .metric-grid-five,
    .offer-editor-layout,
    .affiliate-rule-editor-layout {
        grid-template-columns: 1fr;
    }

    .article-affiliate-link-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-affiliate-link dl > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .affiliate-links-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .affiliate-links-heading p {
        text-align: left;
    }

    .offer-form-heading form {
        width: 100%;
    }

    .offer-form-heading form .button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .affiliate-link-toolbar .search-field,
    .affiliate-link-toolbar .filter-field,
    .affiliate-link-toolbar .button {
        width: 100%;
        flex: 1 0 100%;
    }

    .offer-filter-toolbar .button,
    .offer-category-filter {
        width: 100%;
    }

    .form-card-heading-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .ai-generate-button {
        width: 100%;
    }

    .still-available-action {
        justify-items: stretch;
        text-align: left;
    }

    .article-heading-actions {
        width: 100%;
        justify-items: stretch;
    }

    .linked-category-picker {
        grid-template-columns: 1fr;
    }

    .category-picker-heading > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .pagination-bar,
    .pagination-bar > div {
        align-items: stretch;
        flex-direction: column;
    }
}

.expiration-field-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.expiration-detect-button {
    padding: 0;
    border: 0;
    color: var(--purple);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.expiration-clear-button {
    color: #7d7585;
}

.expiration-clear-button:hover {
    color: #453d4c;
}

.expiration-detect-button:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

.expiration-detect-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.expiration-detection-status {
    min-height: 16px;
    display: block;
    color: #7d7585;
    font-size: 11px;
}

.expiration-detection-success {
    color: #25724b;
}

.expiration-detection-working {
    color: var(--purple);
}

.expiration-detection-info {
    color: #7d7585;
}

.expiration-skip-option {
    margin-top: 4px;
}

/* RSS feed generator */
.rss-page-heading {
    align-items: flex-start;
}

.rss-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.rss-heading-actions form {
    margin: 0;
}

.rss-heading-actions .button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.rss-status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
    gap: 26px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.rss-status-main {
    display: grid;
    align-content: start;
    gap: 8px;
}

.rss-status-main strong {
    font-size: 28px;
    letter-spacing: -0.035em;
}

.rss-status-main p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.rss-file-details {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfbfd;
}

.rss-file-details > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.rss-file-details dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.rss-file-details dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rss-file-details a {
    color: var(--purple-dark);
    text-decoration: none;
}

.rss-file-details code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 600;
}

.rss-file-ready {
    color: var(--green) !important;
}

.rss-file-missing {
    color: var(--amber) !important;
}

.rss-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rss-total-metric {
    border-color: rgba(115, 69, 230, 0.35);
    background: linear-gradient(145deg, #fff, var(--purple-soft));
}

.rss-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 18px 14px;
    border-bottom: 1px solid var(--line);
}

.rss-list-heading h2 {
    margin: 4px 0 0;
    font-size: 21px;
    letter-spacing: -0.025em;
}

.rss-list-heading > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.rss-table {
    min-width: 1180px;
}

.rss-table th:nth-child(2) {
    width: 47%;
}

.rss-content-cell {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rss-content-cell strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
}

.rss-content-cell p {
    display: -webkit-box;
    max-width: 680px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rss-content-cell a {
    max-width: 680px;
    overflow: hidden;
    color: var(--purple-dark);
    font-size: 10px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rss-date-cell {
    white-space: nowrap;
}

.rss-date-cell strong,
.rss-date-cell small {
    display: block;
}

.rss-date-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.rss-image-preview {
    width: 64px;
    height: 50px;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

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

.rss-no-image {
    color: var(--muted);
    font-size: 10px;
}

.rss-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .rss-status-card {
        grid-template-columns: 1fr;
    }

    .rss-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .rss-heading-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .rss-heading-actions .button,
    .rss-heading-actions form {
        width: 100%;
    }

    .rss-heading-actions form .button {
        width: 100%;
    }

    .rss-status-card {
        padding: 18px;
    }

    .rss-file-details > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .rss-metric-grid {
        grid-template-columns: 1fr;
    }
}

.article-type-offer {
    color: var(--green);
    background: var(--green-soft);
}

/* Article list actions */
.article-promote-form {
    margin: 2px 0 0;
}

.article-attention-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #d8cee9;
    border-radius: 8px;
    color: var(--purple-dark);
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 780;
    white-space: nowrap;
}

.article-attention-action:hover {
    border-color: #bda9ee;
    background: var(--purple-soft);
}

.article-row-actions {
    min-width: 72px;
    display: grid;
    justify-items: stretch;
    gap: 5px;
}

.article-edit-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--purple-dark);
    background: #fff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.article-edit-action:hover {
    border-color: #bda9ee;
    background: var(--purple-soft);
}

.article-row-actions .article-delete-form {
    margin: 0;
    text-align: center;
}

.article-row-actions .article-delete-action {
    padding: 1px 4px;
    border: 0;
    color: var(--red);
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 720;
}

.article-row-actions .article-delete-action:hover {
    text-decoration: underline;
}

/* Offer list actions */
.offer-order-cell {
    display: grid;
    justify-items: start;
    gap: 2px;
}

.offer-confirm-form {
    margin: 5px 0 0;
}

.offer-order-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #d8cee9;
    border-radius: 8px;
    color: var(--purple-dark);
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 780;
    white-space: nowrap;
}

.offer-order-action:hover {
    border-color: #bda9ee;
    background: var(--purple-soft);
}

.offer-row-actions {
    min-width: 72px;
    display: grid;
    justify-items: stretch;
    gap: 5px;
}

.offer-edit-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--purple-dark);
    background: #fff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.offer-edit-action:hover {
    border-color: #bda9ee;
    background: var(--purple-soft);
}

.offer-row-actions .offer-delete-form {
    margin: 0;
    text-align: center;
}

.offer-row-actions .offer-delete-action {
    padding: 1px 4px;
    border: 0;
    color: var(--red);
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 720;
}

.offer-row-actions .offer-delete-action:hover {
    text-decoration: underline;
}



/* Sitemap XML options */
.sitemap-option-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.sitemap-lastmod-option {
    flex: 1 1 320px;
    align-items: center;
}

.sitemap-lastmod-option span {
    display: grid;
    gap: 2px;
}

.sitemap-lastmod-option strong {
    font-size: 12px;
    letter-spacing: normal;
}

.sitemap-lastmod-option small {
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 760px) {
    .sitemap-option-form .button {
        width: 100%;
    }
}

/* Offer problem reports */
.reports-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-filter-toolbar .search-field {
    flex: 1 1 420px;
}

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

.report-offer-cell {
    display: grid;
    gap: 6px;
    min-width: 260px;
}

.report-offer-cell .public-url {
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-status-new {
    color: #8a3d00;
    background: #fff2dd;
}

.report-status-reviewed {
    color: #274c77;
    background: #eaf2ff;
}

.report-status-resolved {
    color: #17623d;
    background: #e7f7ef;
}

.report-technical-value,
.report-user-agent {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    word-break: break-word;
}

.reports-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    gap: 24px;
    align-items: start;
}

.report-details-card,
.report-management-card {
    margin: 0;
}

.report-details-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.report-details-list > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #e7e9ee;
}

.report-details-list dt {
    color: #697181;
    font-size: 13px;
    font-weight: 700;
}

.report-details-list dd {
    min-width: 0;
    margin: 0;
    color: #20242b;
}

.report-details-list a {
    word-break: break-word;
}

.report-management-form {
    display: grid;
    gap: 18px;
}

.report-management-actions {
    margin-top: 0;
}

.report-delete-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7e9ee;
}

@media (max-width: 1050px) {
    .reports-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .reports-metric-grid {
        grid-template-columns: 1fr;
    }

    .report-details-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* Stage 6.28: clearer admin navigation, report actions and article categories */
@media (min-width: 821px) {
    .sidebar-nav {
        min-height: 0;
        margin-top: 32px;
        padding-right: 4px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
        gap: 16px;
    }

    .nav-group {
        display: grid;
        gap: 5px;
    }

    .nav-group + .nav-group {
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-group-label {
        margin: 0 12px 4px;
    }

    .nav-link {
        min-height: 38px;
    }
}

@media (max-width: 820px) {
    .sidebar-nav {
        max-width: calc(100vw - 190px);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-group {
        display: contents;
    }
}

.article-category-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.article-category-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.article-category-section-heading h3 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.25;
}

.article-category-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.article-category-selects {
    display: grid;
    gap: 13px;
}

.article-category-selects .field {
    gap: 6px;
}

.article-category-selects select {
    font-weight: 650;
}

.article-category-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.article-category-summary span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #ddd6ee;
    border-radius: 999px;
    color: var(--muted);
    background: #faf8ff;
    font-size: 9px;
    line-height: 1.25;
}

.article-category-summary strong {
    color: var(--purple-dark);
    font-size: 9px;
    font-weight: 800;
}

.reports-table .row-actions {
    align-items: center;
    gap: 6px;
}

.row-actions .report-expire-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #e7b96a;
    border-radius: 8px;
    color: #8a4a00;
    background: #fff8eb;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.row-actions .report-expire-action:hover {
    border-color: #d69b3a;
    background: #fff0d1;
}

.report-heading-expire-form {
    margin: 0;
}

@media (max-width: 980px) {
    .article-category-summary {
        display: grid;
    }

    .article-category-summary span {
        border-radius: 9px;
    }
}

/* Offer-specific How to Get HTML is editable but kept visually distinct from prose fields. */
textarea.code-editor {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    tab-size: 4;
}

/* Category tree index */
.category-panel-toolbar {
    flex-wrap: wrap;
}

.category-panel-toolbar .search-field {
    min-width: 260px;
}

.category-tree-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tree-action {
    min-height: 42px;
    padding-inline: 13px;
    font-size: 11px;
    white-space: nowrap;
}

.category-tree-action:disabled {
    opacity: 0.48;
    cursor: default;
    transform: none;
}

.category-table-wrap {
    position: relative;
}

.category-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: 0 1px 0 var(--line);
}

.category-row-parent td {
    background: #fff;
}

.category-row-parent:hover td {
    background: #faf8fe;
}

.category-row-child td {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: #fdfcff;
}

.category-row-child:hover td {
    background-color: #faf8fe;
}

.category-tree-toggle,
.category-tree-toggle-spacer {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.category-tree-toggle {
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #ded8e9;
    border-radius: 8px;
    color: var(--purple-dark);
    background: #fff;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.category-tree-toggle span {
    display: block;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 140ms ease;
}

.category-tree-toggle[aria-expanded="true"] span {
    transform: rotate(90deg) translateX(-1px);
}

.category-tree-toggle:hover:not(:disabled) {
    color: #fff;
    border-color: var(--purple);
    background: var(--purple);
}

.category-tree-toggle:focus-visible {
    outline: 3px solid rgba(115, 69, 230, 0.15);
    outline-offset: 2px;
}

.category-tree-toggle:disabled {
    opacity: 0.58;
    cursor: default;
}

.category-name-line {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.category-child-count {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid #e3dcf4;
    border-radius: 999px;
    color: #7156b8;
    background: #f7f3ff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.category-row-parent .category-name {
    font-size: 15px;
}

.category-row-child .category-name {
    font-size: 13px;
}

.category-row-child .category-page-title {
    max-width: 360px;
}

.category-row[hidden] {
    display: none;
}

@media (max-width: 1120px) {
    .category-panel-toolbar .search-field {
        flex-basis: 100%;
    }

    .category-panel-toolbar .filter-field {
        flex: 1;
        width: auto;
        min-width: 180px;
    }
}

@media (max-width: 600px) {
    .category-tree-actions {
        width: 100%;
    }

    .category-tree-action {
        flex: 1;
    }
}

/* Admin authentication */
.topbar > .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.admin-session {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: 2px;
    padding-left: 11px;
    border-left: 1px solid var(--line);
}

.admin-session-user {
    max-width: 130px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-session form {
    margin: 0;
}

.topbar-logout {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #4f4859;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 780;
    transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.topbar-logout:hover {
    color: var(--purple-dark);
    border-color: #cfc0ef;
    background: var(--purple-soft);
}

.admin-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 10%, rgba(126, 80, 235, 0.2), transparent 28%),
        radial-gradient(circle at 88% 88%, rgba(31, 199, 191, 0.12), transparent 30%),
        var(--canvas);
}

.admin-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.admin-login-card {
    width: min(440px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(34, 24, 57, 0.13);
}

.admin-login-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    text-decoration: none;
}

.admin-login-brand .brand-mark {
    color: var(--purple);
}

.admin-login-brand .brand-word {
    color: #19151f;
}

.admin-login-brand .brand-admin {
    color: #777080;
}

.admin-login-heading {
    margin-bottom: 24px;
}

.admin-login-eyebrow {
    color: var(--purple);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.admin-login-heading h1 {
    margin: 7px 0 9px;
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.admin-login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.admin-login-form .field + .field {
    margin-top: 17px;
}

.admin-login-form .field-error:empty {
    display: none;
}

.admin-login-submit {
    width: 100%;
    margin-top: 22px;
}

@media (max-width: 1260px) {
    .admin-session-user {
        display: none;
    }
}

@media (max-width: 820px) {
    .admin-session {
        padding-left: 8px;
    }

    .topbar-logout {
        padding-inline: 10px;
    }
}

@media (max-width: 520px) {
    .admin-login-card {
        padding: 28px 22px;
        border-radius: 15px;
    }

    .admin-login-heading h1 {
        font-size: 27px;
    }
}

/* Offer form: category section usability polish */
.primary-category-field {
    padding: 16px;
    border: 1px solid #dccfff;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfaff 0%, #f8f5ff 100%);
}

.primary-category-field .category-picker-heading {
    margin-bottom: 12px;
}

.primary-category-field .category-picker-heading > div {
    align-items: center;
    gap: 12px;
}

.primary-category-field .category-picker-heading strong {
    font-size: 14px;
    font-weight: 900;
}

.category-heading-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid #d9cdf9;
    border-radius: 999px;
    color: var(--purple-dark) !important;
    background: #f3edff;
    font-size: 10px !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em;
}

.primary-category-field > .linked-category-picker {
    padding: 16px;
    border-color: #ddd2fb;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.primary-category-field .linked-category-control label {
    color: #403652;
    font-size: 10px;
    letter-spacing: 0.02em;
}

.primary-category-field .linked-category-control small {
    min-height: 0;
}

.category-cta-field {
    margin-top: 14px;
}

.category-cta-row {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}

.category-cta-value {
    min-height: 40px;
    border-color: #ddd2fb;
    color: var(--purple-dark);
    background: #fbf8ff;
    font-size: 12px;
    font-weight: 800;
}

.category-cta-help {
    margin: 0 !important;
    padding-top: 10px;
    font-size: 10px;
}

.additional-categories-field {
    margin-top: 18px;
}

.additional-category-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.additional-category-slot {
    padding: 12px;
}

.additional-category-slot .linked-category-picker {
    gap: 12px;
}

.additional-category-slot-heading strong {
    font-size: 11px;
}

.additional-category-slot .linked-category-control small {
    min-height: 0;
}

@media (max-width: 1100px) {
    .category-cta-row,
    .additional-category-slots {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .primary-category-field {
        padding: 14px;
    }

    .primary-category-field > .linked-category-picker,
    .additional-category-slot {
        padding: 12px;
    }

    .primary-category-field .category-picker-heading > div {
        align-items: flex-start;
    }
}

/* Draft-only bulk publishing */
.bulk-publish-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 18px 0;
    padding: 11px 12px;
    border: 1px solid #ded4fb;
    border-radius: 11px;
    background: #faf8ff;
}

.bulk-publish-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4c4359;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.bulk-publish-select-all input,
.bulk-row-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
    cursor: pointer;
}

.bulk-publish-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.bulk-publish-count strong {
    color: var(--ink);
}

.bulk-publish-button {
    min-width: 112px;
}

.bulk-publish-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.bulk-select-column {
    width: 42px;
    min-width: 42px;
    padding-right: 4px !important;
    text-align: center;
}

.bulk-row-checkbox {
    display: block;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .bulk-publish-bar {
        align-items: stretch;
        flex-direction: column;
        margin-inline: 12px;
    }

    .bulk-publish-count {
        margin-left: 0;
    }

    .bulk-publish-button {
        width: 100%;
    }
}
