:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #18212f;
    --muted: #667085;
    --line: #d9e0ea;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --danger: #b42318;
    --warn: #b54708;
    --ok: #067647;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 28px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}

.brand img {
    width: 92px;
    height: 34px;
    object-fit: contain;
}

.brand span {
    display: inline-block;
    border-left: 1px solid var(--line);
    padding-left: 10px;
}

.nav-link,
.nav-group summary {
    min-height: 36px;
    border-radius: 6px;
    padding: 8px 10px;
    color: #344054;
    font-weight: 700;
}

.nav-link:hover,
.nav-group summary:hover {
    background: #f2f4f7;
    text-decoration: none;
}

.nav-group {
    position: relative;
}

.nav-group summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    color: var(--muted);
    font-size: 11px;
    content: "v";
}

.nav-group[open] summary {
    background: #f2f4f7;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 4px;
    min-width: 210px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
}

.nav-dropdown a {
    border-radius: 6px;
    padding: 9px 10px;
    color: var(--text);
    font-weight: 600;
}

.nav-dropdown a:hover {
    background: #f8fafc;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100vw - 32px));
    margin: 28px auto;
}

.auth-panel {
    width: min(480px, calc(100vw - 32px));
    margin: 8vh auto;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.job-head {
    align-items: flex-start;
}

h1,
h2 {
    margin: 0 0 10px;
    line-height: 1.2;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 19px;
}

p {
    margin: 0 0 12px;
}

.panel,
.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.disclosure-card {
    padding: 0;
    overflow: hidden;
}

.disclosure-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    padding: 18px 20px;
}

.disclosure-card > summary::-webkit-details-marker {
    display: none;
}

.disclosure-card > summary::after {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    content: "Apri";
}

.disclosure-card[open] > summary {
    border-bottom: 1px solid var(--line);
}

.disclosure-card[open] > summary::after {
    content: "Chiudi";
}

.disclosure-card > summary span {
    display: block;
    color: var(--text);
    font-size: 19px;
    font-weight: 800;
}

.disclosure-card > summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.disclosure-card > form,
.disclosure-card > p,
.disclosure-card > .stack {
    margin: 20px;
}

.disclosure-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 0;
}

.disclosure-panel > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
}

.disclosure-panel > summary::-webkit-details-marker {
    display: none;
}

.disclosure-panel > summary span {
    display: block;
    font-weight: 800;
}

.disclosure-panel > summary small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.disclosure-panel[open] > summary {
    border-bottom: 1px solid var(--line);
}

.disclosure-panel > :not(summary) {
    margin: 14px;
}

.grid {
    display: grid;
    gap: 16px;
}

.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.operator-stats .stat {
    padding: 16px;
}

.dashboard-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.focus-panel {
    min-width: 0;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.job-task-list,
.compact-list,
.dashboard-side {
    display: grid;
    gap: 10px;
}

.job-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    color: var(--text);
}

.job-task-card:first-child {
    border-top: 0;
}

.job-task-card:hover {
    text-decoration: none;
}

.job-task-main h3 {
    margin: 8px 0 6px;
    font-size: 18px;
    line-height: 1.25;
}

.job-task-main p {
    color: var(--muted);
}

.job-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

.job-task-side {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.job-task-side strong {
    color: var(--text);
}

.compact-list a {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    color: var(--text);
}

.compact-list a:first-child {
    border-top: 0;
}

.compact-list a:hover {
    text-decoration: none;
}

.compact-list span {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 20px;
    color: var(--muted);
    background: #fbfcfe;
}

.dashboard-details {
    margin-top: 16px;
}

.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.workflow-grid,
.workflow-section {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.section-heading h2 {
    margin: 0;
}

.section-kicker {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.job-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.source-panel {
    overflow: auto;
}

.source-panel[open] {
    max-height: 520px;
}

.press-material-panel {
    margin-top: 14px;
}

.press-material-list {
    display: grid;
    gap: 12px;
}

.press-material-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 14px;
}

.press-material-item p {
    margin: 4px 0 0;
    word-break: break-word;
}

.small {
    font-size: 13px;
}

.action-panel {
    display: grid;
    gap: 16px;
}

.compact-action-panel {
    gap: 14px;
}

.inline-details summary {
    display: grid;
    gap: 4px;
    cursor: pointer;
    color: var(--brand);
    font-weight: 800;
}

.inline-details summary small {
    color: var(--muted);
    font-weight: 600;
    line-height: 1.35;
}

.inline-details[open] > summary {
    margin-bottom: 12px;
}

.metadata-details .inline-form {
    margin-top: 10px;
}

.action-stack {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.manual-edit-form {
    display: grid;
    gap: 12px;
}

.manual-edit-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.manual-edit-toolbar p {
    flex: 1 1 320px;
    margin: 0;
}

.panel-title-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-title-row h2 {
    margin: 0;
}

.manual-edit-form.is-editing .panel {
    border-color: #f59e0b;
}

.run-config {
    display: grid;
    gap: 8px;
    margin: 0;
}

.run-config div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 8px;
}

.run-config dt {
    color: #475467;
    font-weight: 700;
}

.run-config dd {
    margin: 0;
    color: var(--muted);
}

.stat strong {
    display: block;
    font-size: 28px;
}

.stat span,
.muted {
    color: var(--muted);
}

.stack {
    display: grid;
    gap: 14px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.export-wordpress-form {
    align-items: stretch;
}

.category-picker-set {
    flex: 1 1 100%;
    display: grid;
    gap: 10px;
}

.category-picker {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfe;
}

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

.category-picker legend {
    padding: 0 6px;
    font-weight: 800;
    color: var(--text);
}

.category-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px 14px;
    margin-top: 10px;
}

.category-options .check {
    min-height: 34px;
}

.category-summary-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.category-summary-item {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfcfe;
}

.category-summary-item span {
    text-align: right;
}

.export-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.export-checklist span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.export-checklist span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.export-checklist .is-ok {
    background: #ecfdf3;
    color: var(--ok);
}

.export-checklist .is-blocked {
    background: #fff4ed;
    color: var(--warn);
}

.gmail-message-list {
    display: grid;
    gap: 14px;
}

.gmail-message-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfe;
}

.gmail-message-card p {
    overflow-wrap: anywhere;
}

.check-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}

.pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 5px 10px;
    background: #e9f7f4;
    color: #0f5f57;
    font-size: 0.9rem;
    font-weight: 700;
}

.workflow-guide {
    border-left: 4px solid var(--primary);
}

.workflow-guide-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.workflow-guide-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.workflow-guide-actions form {
    margin: 0;
}

.workflow-guide-actions .button,
.workflow-guide-actions button {
    min-width: 190px;
}

.workflow-guide h2 {
    margin-top: 8px;
    margin-bottom: 6px;
}

.workflow-steps {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-steps li {
    min-width: 86px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.workflow-steps li.is-done {
    border-color: #b7e4d8;
    background: #ecfdf3;
    color: var(--ok);
}

.workflow-steps li.is-current {
    border-color: var(--brand);
    background: #e6f4f1;
    color: var(--brand-dark);
}

.link-suggestions {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 18px;
}

.link-suggestions a {
    font-weight: 700;
}

label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 600;
}

.field-help {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 11px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

textarea[readonly] {
    background: #f8fafc;
    color: #475467;
}

textarea:read-write {
    background: #fff;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
    text-decoration: none;
}

.button.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 14px;
}

.button.ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand-dark);
}

.button.ghost:hover {
    background: #f8fafc;
}

.secondary {
    background: #475467;
}

.button-row {
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.export-table {
    min-width: 760px;
    table-layout: fixed;
}

.export-table th:nth-child(1),
.export-table td:nth-child(1) {
    width: 110px;
}

.export-table th:nth-child(2),
.export-table td:nth-child(2) {
    width: 110px;
}

.export-table th:nth-child(3),
.export-table td:nth-child(3),
.export-table th:nth-child(4),
.export-table td:nth-child(4) {
    width: 120px;
}

.export-table th:nth-child(6),
.export-table td:nth-child(6) {
    width: 130px;
}

.error-cell {
    overflow-wrap: anywhere;
}

.nowrap {
    white-space: nowrap;
}

th {
    color: #475467;
    font-size: 13px;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    background: #e6f4f1;
    color: var(--brand-dark);
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
}

.badge.warn {
    background: #fffaeb;
    color: var(--warn);
}

.badge.ok {
    background: #ecfdf3;
    color: var(--ok);
}

.badge.danger {
    background: #fef3f2;
    color: var(--danger);
}

.badge.primary {
    background: #e6f4f1;
    color: var(--brand-dark);
}

.badge.warning {
    background: #fffaeb;
    color: var(--warn);
}

.badge.success {
    background: #ecfdf3;
    color: var(--ok);
}

.badge.neutral {
    background: #f2f4f7;
    color: #475467;
}

button.danger,
.button.danger {
    background: #b42318;
}

.definition-grid code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 20px;
    margin: 16px 0;
}

.definition-grid dt {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.definition-grid dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.press-office-edit-panel {
    max-width: 1180px;
}

.press-office-edit-panel fieldset {
    background: #fff;
}

.press-office-edit-panel form > button[type="submit"] {
    align-self: flex-start;
    min-width: 220px;
}

.totp-setup {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin: 12px 0 18px;
}

.totp-qr {
    width: 220px;
    height: 220px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flash {
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #eef4ff;
    color: #1849a9;
}

.flash.success {
    background: #ecfdf3;
    color: var(--ok);
}

.flash.error {
    background: #fef3f2;
    color: var(--danger);
}

.flash.warning {
    background: #fffaeb;
    color: var(--warn);
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.plain-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.image-rights-panel {
    display: grid;
    gap: 16px;
}

.image-rights-list {
    display: grid;
    gap: 14px;
}

.image-rights-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 18px;
}

.image-rights-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.image-title-with-preview {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.image-thumb-link {
    display: block;
    width: 112px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f6;
}

.image-thumb-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-thumb-link:hover {
    border-color: var(--brand);
}

.image-rights-header p {
    margin: 4px 0 0;
    word-break: break-word;
}

.image-rights-quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-rights-quick-meta span {
    max-width: 100%;
    border: 1px solid #dfe7ef;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    overflow-wrap: anywhere;
}

.image-rights-details {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.image-rights-details summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 800;
}

.image-rights-details[open] {
    display: grid;
    gap: 16px;
}

.risk-flags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    align-items: start;
}

.risk-flags legend {
    padding: 0 6px;
    font-weight: 700;
}

.risk-flags .check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    line-height: 1.35;
}

.risk-flags .check input {
    margin-top: 3px;
}

.image-rights-card .button-row {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin: 0;
}

.image-rights-card .button-row .check {
    min-height: 44px;
}

.job-image-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 14px;
}

.image-rights-card textarea {
    min-height: 78px;
}

.policy-summary {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.policy-summary.is-ok {
    background: #ecfdf3;
    color: var(--ok);
}

.policy-summary.is-blocked {
    background: #fffaeb;
    color: var(--warn);
}

legend {
    padding: 0 6px;
    color: var(--muted);
}

.issues {
    padding-left: 18px;
}

.issues li {
    margin-bottom: 10px;
}

.corrections-list {
    display: grid;
    gap: 12px;
}

.correction-item {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-left: 8px solid #fff3bf;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.target-list {
    display: grid;
    gap: 16px;
}

.target-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.correction-item.is-recurring {
    background: #fffdf6;
}

.recurrence-note {
    border-radius: 6px;
    background: #fffaeb;
    color: var(--warn);
    padding: 10px 12px;
    margin-bottom: 0;
}

.revision-timeline {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 0 0 22px;
    list-style: none;
}

.revision-timeline::before {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 7px;
    width: 2px;
    background: var(--line);
    content: "";
}

.revision-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.revision-timeline li::before {
    position: absolute;
    top: 17px;
    left: -20px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 1px var(--line);
    content: "";
}

.revision-timeline li.is-recurring {
    border-color: #facc15;
    background: #fffdf6;
}

.revision-timeline time {
    color: var(--muted);
    font-size: 13px;
}

.revision-timeline p {
    margin: 6px 0 0;
}

.diff-box {
    max-height: 460px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfe;
    white-space: pre-wrap;
}

.diff-add {
    border-radius: 3px;
    background: #d8f5a2;
    padding: 0 2px;
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.processing-overlay.is-visible {
    display: flex;
}

.processing-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    width: min(520px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.22);
}

.processing-card h2 {
    margin-bottom: 4px;
}

.processing-card p {
    color: var(--muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #c7d7d4;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.progress-bar {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6f4f1;
}

.progress-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: var(--brand);
    animation: progress-slide 1.25s ease-in-out infinite;
}

button:disabled,
input[type="submit"]:disabled {
    cursor: wait;
    opacity: 0.65;
}

.category-picker-set {
    display: grid;
    gap: 14px;
    margin: 16px 0;
}

.category-picker {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfe;
}

.category-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin-top: 10px;
}

.category-options .check {
    align-items: center;
    gap: 8px;
    min-height: 34px;
}

.policy-preview {
    margin: 12px 0;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f6fbfa;
}

.policy-preview strong {
    display: block;
    margin-bottom: 6px;
    color: var(--brand);
}

.policy-preview p {
    margin: 0 0 6px;
}

.badge.ok {
    background: #e6f4f1;
    color: #0f766e;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes progress-slide {
    0% {
        transform: translateX(-110%);
    }
    50% {
        transform: translateX(75%);
    }
    100% {
        transform: translateX(260%);
    }
}

@media (max-width: 820px) {
    .topbar,
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-menu {
        align-items: stretch;
        width: 100%;
    }

    .nav-group,
    .nav-link {
        width: 100%;
    }

    .nav-group summary,
    .nav-link {
        width: 100%;
    }

    .nav-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .stats,
    .dashboard-workspace,
    .workflow-guide-content,
    .two {
        grid-template-columns: 1fr;
    }

    .panel-head,
    .job-task-card,
    .category-summary-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .job-task-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .job-task-side {
        justify-items: start;
    }

    .workflow-steps {
        flex-wrap: wrap;
    }

    .workflow-guide-actions {
        justify-content: stretch;
    }

    .workflow-guide-actions .button,
    .workflow-guide-actions button,
    .workflow-guide-actions form {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .run-config div,
    .gmail-message-card,
    .processing-card,
    .revision-timeline li {
        grid-template-columns: 1fr;
    }

    .image-rights-header {
        flex-direction: column;
    }

    .image-title-with-preview {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .image-thumb-link {
        width: 88px;
    }

    .risk-flags {
        grid-template-columns: 1fr;
    }

    .image-rights-card .button-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .press-material-item,
    .job-image-upload {
        grid-template-columns: 1fr;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    th {
        display: none;
    }

    td {
        padding: 9px 0;
    }
}
