
/* === Shared admin UI layer === */
:root {
	--bg: #f0f0f1;
	--surface: #ffffff;
	--surface-alt: #f6f7f7;
	--surface-muted: #fbfbfc;
	--border: #c3c4c7;
	--border-soft: #dcdcde;
	--text: #1d2327;
	--muted: #50575e;
	--primary: #2271b1;
	--primary-hover: #135e96;
	--success: #00a32a;
	--warning: #996800;
	--danger: #d63638;
	--info: #2271b1;
	--neutral: #50575e;
}

* {
	box-sizing: border-box;
}

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

a:hover {
	text-decoration: underline;
}

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

.sp-page .sp-btn {
  display: inline-flex;
  justify-content: space-around;
}

.sp-page form.sp-log-actions {
  margin-top: 13px;
}

.flex {
	display: flex;
}

.sp-delivery-control,
.sp-transport-tools-ok,
.sp-transport-tools-banner,
.sp-folder-picker {
	padding: 12px 14px;
	margin-top: 14px;
	margin-bottom: 14px;
	background: var(--surface-muted);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
}

.sp-protocol-ssh .description {
    padding: unset;
    border: unset;
    background: unset;
    margin: unset;
}

.sp-page-header {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-direction: column;
}

.sp-page-header h1,
.wrap h1,
.sp-page-title {
	margin: 0;
}

.sp-page-desc,
.wrap > p {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.sp-header-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: center;
	align-items: center;
}

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

.sp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

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

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

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

.sp-card,
.widefat {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	overflow: hidden;
}

.sp-card h2,
.sp-card h3,
.wrap h2,
.wrap h3 {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
}

.sp-card h3 {
	font-size: 15px;
}

.sp-card p:last-child {
	margin-bottom: 0;
}

.sp-card__body {
	padding: 16px 18px;
}

.sp-card__body--flush {
	padding: 0;
}

.sp-card > .sp-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: var(--surface-alt);
	border-bottom: 1px solid var(--border-soft);
}

section > .sp-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
}

.wrap .sp-card__title {
	margin: 0 0 0 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
}

.sp-note {
	padding: 12px 14px;
	margin: 0 0 16px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-left: 4px solid var(--primary);
	border-radius: 4px;
}

.sp-note p {
	margin: 0;
}

.sp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100099;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sp-modal {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	overflow-y: auto;
}

.sp-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 12px;
	border-bottom: 1px solid #e0e0e0;
}

.sp-modal__title {
	margin: 0;
	font-size: 15px;
}

.sp-modal__close {
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--muted);
	padding: 0 2px;
}

.sp-modal__close:hover {
	color: var(--text);
}

.sp-modal__body {
	padding: 16px 20px;
}

.sp-modal__desc {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 13px;
}

.sp-modal__options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-modal__option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	font-size: 13px;
}

.sp-modal__option:hover {
	border-color: var(--primary);
	background: #f0f6fc;
}

.sp-modal__option input:checked ~ span {
	color: var(--primary);
}

.sp-modal__option input[type="radio"],
.sp-modal__option input[type="checkbox"] {
	margin: 0;
}

.sp-modal__option .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	color: var(--muted);
}

.sp-modal__option--remote {
	border-style: dashed;
}

.sp-modal__divider {
	margin: 12px 0;
	border: none;
	border-top: 1px solid #e0e0e0;
}

.sp-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 20px 16px;
	border-top: 1px solid #e0e0e0;
}

/* ── Header actions — right-aligned group ──────────── */
.sp-header-actions-right {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

/* ── Modal form fields (replaces form-table) ───────── */
.sp-modal-fields {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sp-modal-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sp-modal-field--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0;
}

.sp-modal-field--checkbox:last-child {
	margin-top: 2px;
}

.sp-modal-field__label {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.sp-modal-field__input {
	width: 100%;
	max-width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.4;
	background: var(--surface);
	color: var(--text);
	box-sizing: border-box;
}

.sp-modal-field__input:focus {
	border-color: var(--primary);
	outline: none;
	box-shadow: 0 0 0 1px var(--primary);
}

.sp-modal-field__input--small {
	width: 100px;
}

.sp-modal-field__input--code {
	font-family: Menlo, Consolas, 'Courier New', monospace;
	font-size: 12px;
}

select.sp-modal-field__input {
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 10px;
	padding-right: 28px;
}

input[type="time"].sp-modal-field__input {
	width: 100%;
}

.sp-modal-field__help {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

.sp-modal-field__checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
	padding: 2px 0;
	justify-content: flex-start;
}

.sp-modal-field__checkbox-label input[type="checkbox"] {
	margin: 0;
}

/* ── Inline field row (frequency + weekday + time) ── */
.sp-modal-field-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.sp-modal-field--grow {
	flex: 1;
	min-width: 0;
}

/* ── Wide modal overrides ──────────────────────────── */
.sp-modal--wide {
	width: min(640px, calc(100vw - 32px));
}

.sp-modal--wide .sp-modal__header {
	padding: 14px 20px 12px;
}

.sp-modal--wide .sp-modal__divider {
	margin: 0px;
}

.sp-modal--wide .sp-modal__body {
	padding: 0;
}

/* ── Modal tabs ────────────────────────────────────── */
.sp-modal-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--border);
	padding: 0 20px;
	margin: 0;
	list-style: none;
	background: var(--surface);
}

.sp-tab-button {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
	white-space: nowrap;
	background: none;
	border-top: none;
	border-left: none;
	border-right: none;
}

.sp-tab-button:hover {
	color: var(--text);
}

.sp-tab-button.active {
	color: var(--primary);
	border-bottom-color: var(--primary);
	font-weight: 600;
}

.sp-tab-content {
	display: none;
	padding: 16px 20px;
}

.sp-tab-content.active {
	display: block;
	max-height: calc(80vh - 140px);
	overflow-y: auto;
}

/* ── Form groups ───────────────────────────────────── */
.sp-form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.sp-form-row > .sp-form-group {
	flex: 1;
	min-width: 0;
	margin-bottom: 0;
}

.sp-form-group {
	margin-bottom: 16px;
}

.sp-form-group:last-child {
	margin-bottom: 0;
}

.sp-form-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 4px;
}

.sp-select,
.sp-input {
	width: 100%;
	max-width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.4;
	background: var(--surface);
	color: var(--text);
	box-sizing: border-box;
}

.sp-select:focus,
.sp-input:focus {
	border-color: var(--primary);
	outline: none;
	box-shadow: 0 0 0 1px var(--primary);
}

.sp-select {
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 10px;
	padding-right: 28px;
}

.sp-input-time {
	width: auto;
}

.sp-input-number {
	width: 100px;
}

.sp-form-description {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

/* ── Notices ───────────────────────────────────────── */
.sp-notice {
	padding: 10px 14px;
	border-radius: 0;
	margin-bottom: 14px;
	font-size: 13px;
	line-height: 1.4;
	background: #f0f6fc;
	border-left: 4px solid #72aee6;
	color: #1d2327;
}

.sp-notice--error {
	background: #fcf0f1;
	border-left-color: #d63638;
}

.sp-notice--success {
	background: #edfaef;
	border-left-color: #00a32a;
}

.sp-notice--warning {
	background: #fcf9e8;
	border-left-color: #dba617;
}

/* ── Code display ──────────────────────────────────── */
.sp-code {
	font-family: Menlo, Consolas, 'Courier New', monospace;
	font-size: 12px;
	padding: 8px 12px;
	background: #f3f4f6;
	border: 1px solid var(--border);
	border-radius: 4px;
	word-break: break-all;
	line-height: 1.5;
}

/* ── Schedule sections inside site settings modal ─── */
.sp-modal-schedule-section {
	padding: 14px 20px;
}

.sp-modal-schedule-section + .sp-modal-schedule-section {
	border-top: 1px solid var(--border-soft);
}

.sp-modal-schedule-section__heading {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
}

.sp-modal-schedule-section .sp-modal-fields {
	gap: 10px;
}

/* ── Site settings modal footer (save button) ──────── */
.sp-modal-settings-footer {
	padding: 12px 20px;
	border-top: 1px solid var(--border-soft);
	text-align: left;
	background: var(--surface-alt);
}

/* ── Settings block inside wide modal ──────────────── */
.sp-modal-settings-block {
	padding: 16px 20px;
}

/* ── Trigger panel inside site settings modal ──────── */
.sp-modal-trigger-panel {
	padding: 14px 20px 16px;
}

.sp-modal-trigger-panel__title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
}

.sp-modal-trigger-panel__description {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

.sp-modal-trigger-panel__actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

/* ── Monitored Sites table — tighter Site column ──── */
#sp-monitor-sites-table th:first-child,
#sp-monitor-sites-table td:first-child {
	width: 140px;
	max-width: 140px;
}

.sp-site-cell__url {
	word-break: break-all;
}

.sp-link-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.sp-link-card {
	display: block;
	padding: 18px 20px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	color: var(--text);
}

.sp-link-card:hover {
	background: var(--surface-alt);
	text-decoration: none;
}

.sp-link-card strong {
	display: block;
	margin-bottom: 6px;
	font-size: 16px;
}

.sp-link-card span {
	display: block;
	color: var(--muted);
	font-size: 13px;
}

.sp-inline-actions,
.sp-actions-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.sp-form-table p.sp-inline-actions {
    margin-top: 14px;
}

.sp-status-text {
	color: var(--muted);
	font-size: 13px;
}

.sp-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: sp-spinner-rotate 0.8s linear infinite;
	margin: 1rem 0;
}

@keyframes sp-spinner-rotate {
	to {
		transform: rotate(360deg);
	}
}

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

.sp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	min-width: 110px;
	padding: 0 12px;
	background: var(--surface-alt);
	color: var(--text);
	border: 1px solid var(--border-soft);
	border-radius: 3px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

.sp-btn:hover {
	background: var(--surface);
	text-decoration: none;
}

.button-primary,
.sp-button--primary {
	background: var(--primary);
	color: #ffffff;
	border-color: var(--primary);
}

.sp-btn--primary {
	background: var(--primary);
	color: #ffffff;
	border-color: var(--primary);
}

.button-primary:hover,
.sp-button--primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

.sp-btn--primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

.sp-btn--ghost {
	background: var(--surface);
	color: var(--text);
}

.sp-btn--ghost:hover {
	background: var(--surface-alt);
}

.sp-btn--ghost.sp-btn--icon {
	color: var(--primary);
	border-color: var(--border-soft);
}

.sp-btn--ghost.sp-btn--icon:hover {
	background: var(--surface-alt);
	border-color: var(--primary);
}

.sp-link {
	color: var(--primary);
	text-decoration: none;
	cursor: pointer;
	font-size: 13px;
	white-space: nowrap;
}
.sp-link:hover {
	text-decoration: underline;
}
.sp-link--danger {
	color: var(--danger);
}

.sp-btn--danger {
	background: var(--surface);
	border-color: #dba7a8;
	color: var(--danger);
}

.sp-btn--danger:hover {
	background: #fcf0f1;
}

.sp-btn--danger.sp-btn--icon {
	color: var(--danger);
	border-color: #dba7a8;
}

.sp-btn--danger.sp-btn--icon:hover {
	background: #fcf0f1;
	border-color: var(--danger);
}

.sp-btn--icon {
	width: 28px;
	min-width: 28px;
	min-height: 28px;
	padding: 0;
}

.sp-btn--icon .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
	display: inline-block;
}

.sp-btn--icon svg {
	width: 14px;
	height: 14px;
	display: block;
}

.button-small {
	min-height: 28px;
	padding: 0 10px;
	font-size: 12px;
}

.sp-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.sp-badge--success {
	color: var(--success);
}

.sp-badge--warning {
	color: var(--warning);
}

.sp-badge--danger {
	color: var(--danger);
}

.sp-badge--info {
	color: var(--info);
}

.sp-badge--neutral {
	color: var(--neutral);
}

.sp-badge--muted {
	color: #787c82;
}

.sp-badge--asset-script {
	color: #6c3baa;
}

.sp-badge--asset-style {
	color: #0d7e6e;
}

.sp-badge--asset-other {
	color: #616971;
}

.submit:not(.sp-page-header .submit) {
	margin: 16px 0 0;
}

.description {
	display: block;
	margin-top: 6px;
	color: var(--muted);
	font-size: 12px;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="time"],
input[type="password"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 3px;
	color: var(--text);
}

select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2350575e' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
	background-position: right 11px center;
	background-repeat: no-repeat;
	background-size: 10px 6px;
}

.sp-form-table select {
    max-width: 100%;
}

.sp-page select {
	border: 1px solid var(--border-soft);
}

input[readonly] {
	background: var(--surface-alt);
}

.regular-text {
	max-width: none;
}

.large-text {
	max-width: 100%;
}

.small-text,
input.small-text,
input[type="number"].small-text {
	width: 100%;
}

textarea {
	min-height: 120px;
	resize: vertical;
}

code {
	display: inline-block;
	max-width: 100%;
	padding: 1px 6px;
	background: var(--surface-alt);
	border: 1px solid #e2e4e7;
	border-radius: 3px;
	font-size: 12px;
	white-space: pre-wrap;
	word-break: break-word;
}

pre {
	margin: 0;
	background: #f0f0f1;
	padding: 10px;
}

.form-table,
.sp-table {
	width: 100%;
	border-collapse: collapse;
}

.form-table th,
.form-table td {
	padding: 8px 0;
	border-bottom: 1px solid var(--border-soft);
	text-align: left;
	vertical-align: top;
}

.form-table th {
	width: 200px;
	white-space: nowrap;
	padding-right: 18px;
	font-weight: 600;
}

.form-table tr:last-child th,
.form-table tr:last-child td {
	border-bottom: 0;
}

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

.sp-table thead th {
	padding: 8px 16px;
	background: var(--surface-alt);
	color: var(--muted);
	border-bottom: 1px solid var(--border-soft);
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sp-table tbody td {
	padding: 8px 16px;
	border-bottom: 1px solid var(--border-soft);
	vertical-align: top;
	font-size: 13px;
}

.sp-table tbody tr:nth-child(even) {
	background: #fcfcfc;
}

.sp-table tbody tr:last-child td {
	border-bottom: 0;
}

.sp-table tbody tr:hover {
	background: var(--surface-alt);
}

.widefat,
.sp-table,
.sp-history-mini {
	width: 100%;
	border-collapse: collapse;
}

.widefat thead th,
.sp-history-mini thead th {
	padding: 12px 16px;
	background: var(--surface-alt);
	color: var(--muted);
	border-bottom: 1px solid var(--border-soft);
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.widefat tbody td,
.sp-history-mini tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border-soft);
	vertical-align: top;
	font-size: 13px;
}

.widefat tbody tr:nth-child(even),
.sp-history-mini tbody tr:nth-child(even) {
	background: #fcfcfc;
}

.widefat tbody tr:last-child td,
.sp-history-mini tbody tr:last-child td {
	border-bottom: 0;
}

.sp-monitor-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
	gap: 16px;
	align-items: stretch;
}

.sp-card--monitor-settings,
.sp-card--monitor-add {
	height: 100%;
}

.sp-card--monitor-add {
	display: flex;
	flex-direction: column;
}

.sp-card--monitor-add form {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.sp-card--monitor-add .sp-form-table {
	flex: 1;
}

.sp-card--monitor-settings .form-table th,
.sp-card--monitor-add .form-table th {
	width: 160px;
	padding-right: 16px;
	white-space: nowrap;
}

.sp-card--monitor-settings .regular-text,
.sp-card--monitor-settings .small-text,
.sp-card--monitor-add .regular-text,
.sp-card--monitor-add .small-text {
	width: 100%;
	max-width: none;
}

.sp-desc,
.sp-empty {
	margin: 0 0 12px;
	color: var(--muted);
}


.sp-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 0 0 18px;
}

.sp-stack > .sp-summary {
	margin-bottom: 0;
}

.sp-summary-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
}

.sp-summary-num {
	font-size: 32px;
	line-height: 1.1;
	font-weight: 600;
}

.sp-summary-label {
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sp-summary--ok {
	border-top: 3px solid var(--success);
}

.sp-summary--warning {
	border-top: 3px solid #dba617;
}

.sp-summary--info {
	border-top: 3px solid #4b98d7;
}

.sp-summary--neutral {
	border-top: 3px solid #50575e;
}

.sp-summary--failed,
.sp-summary--offline {
	border-top: 3px solid var(--danger);
}

.sp-summary--total {
	border-top: 3px solid var(--primary);
}

.sp-form-table th {
	width: 160px;
}

.sp-actions,
.sp-schedule-actions,
.sp-folder-actions,
.sp-log-actions,
.sp-monitor-actions {
	display: inline-flex;
	flex-wrap: nowrap;
	gap: 5px;
	align-items: center;
}

.sp-table th.sp-th-actions {
	width: 1%;
	white-space: nowrap;
}

.sp-table td.sp-td-actions {
	white-space: nowrap;
	padding: 3px 16px;
}

#rb-history-table td:nth-last-child(1),
#rb-history-table td:nth-last-child(2),
#rb-history-table th:nth-last-child(1),
#rb-history-table th:nth-last-child(2) {
	width: 1%;
	white-space: nowrap;
	padding-left: 6px;
	padding-right: 6px;
}

#rb-history-table td:nth-last-child(2),
#rb-history-table th:nth-last-child(2) {
	padding-right: 4px;
}

#rb-history-table td:nth-last-child(1),
#rb-history-table th:nth-last-child(1) {
	padding-left: 4px;
}

.sp-monitor-actions {
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
}

.sp-btn--both {
	min-width: 132px;
}

.sp-divider {
	height: 1px;
	margin: 18px 0;
	background: var(--border-soft);
	border: 0;
}

.sp-delivery-control,
.sp-transport-tools-ok,
.sp-transport-tools-banner,
.sp-folder-picker {
	padding: 12px 14px;
	margin-top: 14px;
	margin-bottom: 14px;
	background: var(--surface-muted);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
}

.sp-protocol-ssh .description {
    padding: unset;
    border: unset;
    background: unset;
    margin: unset;
}

.sp-delivery-control {
	display: grid;
	grid-template-columns: 120px minmax(240px, 1fr);
	align-items: start;
	gap: 12px;
}

.sp-delivery-control .description {
	grid-column: 2 / -1;
	margin-top: 0;
}

.sp-folder-label {
	margin: 0 0 0px;
}

.sp-folder-label--toggle {
	cursor: pointer;
	user-select: none;
}

.sp-folder-label--toggle:hover {
	color: var(--wp-admin-theme-color, #2271b1);
}

.sp-folder-tree {
	max-height: 340px;
	overflow: auto;
	margin-bottom: 12px;
	padding: 4px;
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	background: var(--surface);
	font-size: 13px;
}

.sp-tree-node + .sp-tree-node {
	border-top: 1px solid var(--border-soft);
}

.sp-tree-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
}

.sp-tree-row--child {
	padding-left: 32px;
}

.sp-tree-toggle,
.sp-tree-spacer {
	display: inline-flex;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	align-items: center;
	justify-content: center;
}

.sp-tree-toggle {
	cursor: pointer;
	user-select: none;
}

.sp-tree-toggle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--muted, #8c8f94);
	transition: transform 0.15s ease;
}

.sp-tree-toggle.is-open .dashicons {
	transform: rotate(90deg);
}

.sp-folder-item,
.sp-checkbox-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.sp-folder-item .dashicons,
.sp-file-item .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--muted, #8c8f94);
}

#rb-auth-modal-form,
#rb-schedule-form,
#rb-remote-form,
#rb-pull-form {
	margin: 0;
}

#rb-files-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 16px 0 12px;
}

#rb-files-toolbar .sp-actions {
	flex-wrap: wrap;
}

#rb-schedules-grid > .sp-card,
#rb-access-grid > .sp-card {
	display: flex;
	flex-direction: column;
}

#rb-schedules-grid > .sp-card > .sp-card__body,
#rb-access-grid > .sp-card > .sp-card__body {
	flex: 1;
}

#rb-scheduled-delivery-control,
#rb-remote-actions,
#rb-pull-actions {
	margin-bottom: 0;
}

.sp-tree-children {
	padding-left: 16px;
	padding-bottom: 1px;
}

.sp-tree-loading,
.sp-tree-error {
	padding: 3px 8px;
	font-size: 11px;
	color: var(--muted);
}

.sp-tree-loading .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
	vertical-align: middle;
	margin-right: 4px;
}

.sp-tree-error {
	color: var(--danger, #d63638);
}

.sp-tree-node--file .sp-tree-row {
	padding-top: 2px;
	padding-bottom: 2px;
}

.sp-file-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--muted);
}

.sp-folders-saved {
	color: var(--success);
	font-weight: 600;
}

.sp-progress-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px;
	margin: 14px 0 0;
	background: rgba(34, 113, 177, 0.08);
	border: 1px solid #b8cee4;
	border-radius: 4px;
}

.sp-log {
	overflow: auto;
	white-space: pre-wrap;
	background: var(--surface);
	padding: 14px 16px;
	margin: 0;
	border-radius: 0 0 6px 6px;
	font-size: 12px;
	line-height: 1.6;
	max-height: 420px;
}

.sp-ok {
	color: var(--success);
	font-weight: 600;
}

.sp-missing {
	color: var(--danger);
	font-weight: 600;
}

.sp-status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.sp-status-badge--ok {
	background: #edfaef;
	color: var(--success);
	border-color: #b8e6c1;
}

.sp-status-badge--warning {
	background: #fff8e1;
	color: var(--warning);
	border-color: #ecd48c;
}

.sp-status-badge--failed,
.sp-status-badge--offline {
	background: #fff1f1;
	color: var(--danger);
	border-color: #efb1b2;
}

.sp-status-info {
	color: var(--muted);
}

.sp-delete {
	color: var(--danger);
}

.sp-history-detail > td {
	background: var(--surface-muted);
	padding: 0 !important;
}

.sp-history-mini {
	margin-top: 10px;
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	overflow: hidden;
}

.sp-monitor-files {
	padding-left: 18px;
	margin: 0;
}

.sp-monitor-files li + li {
	margin-top: 6px;
}

.sp-page-title {
	margin-bottom: 0;
}

.sp-site-cell {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.sp-site-cell__name {
	font-weight: 600;
}

.sp-site-cell__url {
	color: var(--primary);
	font-size: 12px;
	line-height: 1.4;
	word-break: break-word;
}

.sp-site-cell__meta {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.4;
}

.sp-monitor-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}

.sp-monitor-meta strong {
	font-weight: 600;
}

.sp-monitor-meta span {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.4;
}

.sp-monitor-sites .sp-table td:last-child {
	white-space: nowrap;
}

.sp-monitor-sites .sp-table th:nth-child(1),
.sp-monitor-sites .sp-table td:nth-child(1),
.sp-history-mini--saved th:nth-child(1),
.sp-history-mini--saved td:nth-child(1) {
	width: 22%;
}

.sp-monitor-sites .sp-table th:nth-child(2),
.sp-monitor-sites .sp-table td:nth-child(2),
.sp-history-mini--saved th:nth-child(2),
.sp-history-mini--saved td:nth-child(2) {
	width: 10%;
}

.sp-monitor-sites .sp-table th:nth-child(3),
.sp-monitor-sites .sp-table td:nth-child(3),
.sp-monitor-sites .sp-table th:nth-child(5),
.sp-monitor-sites .sp-table td:nth-child(5),
.sp-history-mini--saved th:nth-child(3),
.sp-history-mini--saved td:nth-child(3),
.sp-history-mini--saved th:nth-child(5),
.sp-history-mini--saved td:nth-child(5) {
	width: 17%;
}

.sp-monitor-sites .sp-table th:nth-child(4),
.sp-monitor-sites .sp-table td:nth-child(4),
.sp-history-mini--saved th:nth-child(4),
.sp-history-mini--saved td:nth-child(4) {
	width: 20%;
}

.sp-monitor-sites .sp-table th:nth-child(6),
.sp-monitor-sites .sp-table td:nth-child(6),
.sp-history-mini--saved th:nth-child(6),
.sp-history-mini--saved td:nth-child(6) {
	width: 14%;
}

.sp-history-detail-body {
	display: flex;
	flex-direction: column;
}

.sp-history-block + .sp-history-block {
	border-top: 1px solid var(--border-soft);
}

.sp-history-block__header {
	padding: 12px 16px;
	background: var(--surface-alt);
	border-bottom: 1px solid var(--border-soft);
	font-size: 13px;
	font-weight: 600;
}

.sp-history-detail .sp-history-mini {
	margin-top: 0;
	border: 0;
	border-radius: 0;
}

.sp-history-detail .sp-history-mini thead th {
	padding-top: 16px;
	padding-bottom: 16px;
}

.sp-history-detail .sp-history-mini tbody td {
	padding-top: 18px;
	padding-bottom: 18px;
	line-height: 1.45;
}

.sp-history-mini__blank {
	padding-left: 0;
	padding-right: 0;
}

.sp-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 16px 0 10px;
}

.sp-section-header h2 {
	margin: 0;
}

.sp-section-header .sp-header-actions form {
	display: inline;
}

.sp-monitor-inline-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px 18px;
	flex-direction: column;
}

.sp-monitor-inline-actions > div:first-child {
	flex: 1 1 0%;
	min-width: 0;
}

.sp-monitor-inline-actions .sp-desc {
	margin-bottom: 0;
}

@media (max-width: 960px) {

  .sp-grid--4,
.sp-grid--3,
.sp-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

  .sp-delivery-control {
		grid-template-columns: 1fr;
	}

  .form-table th {
		width: 180px;
	}

}


@media (max-width: 782px) {

  .sp-page-header {
		flex-direction: column;
		align-items: center;
	}

  .form-table,
.form-table tbody,
.form-table tr,
.form-table th,
.form-table td {
		display: block;
		width: 100%;
	}

  .form-table th {
		padding: 12px 0 4px;
	}

  .form-table td {
		padding: 0 0 12px;
	}

}


@media (max-width: 600px) {

  .sp-grid--4,
.sp-grid--3,
.sp-grid--2 {
		grid-template-columns: 1fr;
	}

  .sp-page-header h1,
.wrap h1,
.sp-page-title {
		font-size: 22px;
	}

  .widefat,
.sp-history-mini {
		display: block;
		overflow: auto;
	}

}


/* ================================================================
   Diagnostics and reporting surfaces
   ================================================================ */

.sp-card--elevated {
	border-top: 3px solid var(--primary);
}

.sp-card__desc {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
}

.sp-stat-value {
	font-size: 38px;
	line-height: 1.1;
	font-weight: 600;
}

.sp-field__help {
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sp-code-block {
	margin: 0;
	padding: 14px;
	background: #111827;
	border-radius: 4px;
	overflow: auto;
}

.sp-code-block code {
	display: block;
	padding: 0;
	background: transparent;
	border: 0;
	color: #e5e7eb;
	white-space: pre-wrap;
}

.sp-scan-summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

#sp-scan-results {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: start;
}

#sp-scan-results > section,
#sp-scan-results .sp-card {
	width: 100%;
}

#sp-scan-results > section {
	min-width: 0;
}

#sp-scan-results .sp-table {
	table-layout: fixed;
}

#sp-scan-results .sp-table th:nth-child(1),
#sp-scan-results .sp-table td:nth-child(1) {
	width: 30%;
}

#sp-scan-results .sp-table th:nth-child(2),
#sp-scan-results .sp-table td:nth-child(2) {
	width: 15%;
	white-space: nowrap;
}

#sp-scan-results .sp-table th:nth-child(3),
#sp-scan-results .sp-table td:nth-child(3) {
	width: 15%;
	white-space: nowrap;
}

#sp-scan-results .sp-table th:nth-child(4),
#sp-scan-results .sp-table td:nth-child(4) {
	width: 40%;
}

#sp-sessions-table td:last-child {
	white-space: nowrap;
}

#sp-scan-score-body {
	font-size: 13px;
}

.sp-score {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 16px;
}

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

.sp-score__value {
	font-size: 26px;
	line-height: 1.2;
	font-weight: 600;
}

.sp-score__label {
	color: var(--muted);
	font-size: 16px;
	line-height: 1.2;
}

.sp-score__headline {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
}

.sp-score__summary {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}

#sp-scan-section {
	margin-top: 18px;
}

#sp-scan-results {
	margin-top: 16px;
}

.sp-scan-cat-badge {
	min-width: 28px;
	height: 28px;
	min-height: 28px;
	padding: 0;
}

#sp-report-page {
	padding-bottom: 32px;
}

#sp-report-header-desc {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

#sp-report-back-btn {
	white-space: nowrap;
}

#sp-report-summary {
	gap: 20px;
}

.sp-summary--neutral {
	border-top: 3px solid var(--primary);
}

#sp-report-memory-timeline {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 10px;
}

#sp-report-memory-lifecycle-body {
	padding: 0;
}

.sp-memory-phase {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 10px 8px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
}

.sp-memory-phase__label {
	color: var(--muted);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.15;
	text-transform: none;
	word-break: break-word;
}

.sp-memory-phase__value {
	font-size: 16px;
	line-height: 1.2;
	font-weight: 600;
}

.sp-memory-phase__delta {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	min-height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

.sp-delta--ok {
	background: #edfaef;
	color: var(--success);
	border: 1px solid #b8e6c1;
}

.sp-tabs,
.sp-tab {
	display: grid;
	width: 100%;
}

.sp-tabs {
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 6px;
}

.sp-tab {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 8px 12px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	color: var(--text);
	cursor: pointer;
	text-align: left;
	transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.sp-tab__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-tab .sp-badge {
	justify-self: end;
	flex-shrink: 0;
}

#sp-report-tabs .sp-badge {
	height: 30px;
	width: 30px;
	padding: 0;
}

#sp-report-tabs .sp-tab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	min-height: 78px;
}

#sp-report-tabs .sp-tab__label {
	font-size: 12px;
	line-height: 1.3;
}

#sp-report-tab-db_query .sp-badge {
	background: #eef4fb;
	color: #135e96;
	border-color: #b8cee4;
}

#sp-report-tab-http_request .sp-badge {
	background: #edfaef;
	color: #0a7a2d;
	border-color: #b8e6c1;
}

#sp-report-tab-asset .sp-badge {
	background: #f4efff;
	color: #6941c6;
	border-color: #d8ccff;
}

#sp-report-tab-page_load .sp-badge {
	background: #edf8f7;
	color: #0f766e;
	border-color: #b8e0dd;
}

#sp-report-tab-client_timing .sp-badge {
	background: #fff8e1;
	color: #996800;
	border-color: #ecd48c;
}

#sp-report-tab-hooks .sp-badge {
	background: #fff1f5;
	color: #be185d;
	border-color: #f3b5ca;
}

#sp-report-tab-slow_queries .sp-badge {
	background: #fff1f1;
	color: #d63638;
	border-color: #efb1b2;
}

#sp-report-tab-plugin_costs .sp-badge {
	background: #eef2ff;
	color: #4338ca;
	border-color: #c7d2fe;
}

#sp-report-tab-recommendations .sp-badge {
	background: #fdf6ec;
	color: #b45309;
	border-color: #f3d3ad;
}

.sp-tab:hover {
	background: var(--surface);
	border-color: var(--primary);
	color: var(--primary);
}

.sp-tab.is-active {
	background: var(--surface);
	border-color: var(--primary);
	color: var(--primary);
}

.sp-tab-panel {
	display: none;
}

.sp-tab-panel.is-active {
	display: block;
}

#sp-report-page section > .sp-card__header {
	margin: 14px 0 10px;
}

#sp-report-panel-slow_queries,
#sp-report-panel-recommendations {
	background: var(--bg);
}

.sp-subsection + .sp-subsection {
	margin-top: 20px;
}

.sp-subsection__title {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
}

#sp-sessions-table,
#sp-report-tabs-body .sp-table {
	min-width: 760px;
}

#sp-report-tabs-body .sp-table thead th {
	white-space: nowrap;
}

#sp-report-tabs-body .sp-table td:first-child {
	min-width: 280px;
}

#sp-report-table-db,
#sp-report-table-http,
#sp-report-table-hooks,
#sp-report-table-pageload,
#sp-report-table-pc,
#sp-report-table-cr {
	min-width: 960px;
}

#sp-report-table-db th:nth-child(n+2),
#sp-report-table-db td:nth-child(n+2),
#sp-report-table-http th:nth-child(n+2),
#sp-report-table-http td:nth-child(n+2),
#sp-report-table-hooks th:nth-child(n+2),
#sp-report-table-hooks td:nth-child(n+2) {
	width: 110px;
	white-space: nowrap;
}

#sp-report-table-db th:nth-child(2),
#sp-report-table-db td:nth-child(2),
#sp-report-table-http th:nth-child(2),
#sp-report-table-http td:nth-child(2),
#sp-report-table-hooks th:nth-child(2),
#sp-report-table-hooks td:nth-child(2),
#sp-report-table-pageload th:nth-child(2),
#sp-report-table-pageload td:nth-child(2),
#sp-report-table-cr th:nth-child(2),
#sp-report-table-cr td:nth-child(2) {
	width: 90px;
}

#sp-report-table-pageload th:nth-child(n+2),
#sp-report-table-pageload td:nth-child(n+2) {
	width: 120px;
	white-space: nowrap;
}

#sp-report-table-pageload th:nth-child(2),
#sp-report-table-pageload td:nth-child(2) {
	width: 90px;
}

#sp-report-table-pc th:nth-child(n+2),
#sp-report-table-pc td:nth-child(n+2) {
	width: 120px;
	white-space: nowrap;
}

#sp-report-table-cr th:nth-child(n+2),
#sp-report-table-cr td:nth-child(n+2) {
	width: 110px;
	white-space: nowrap;
}

#sp-report-table-ct th:nth-child(n+2),
#sp-report-table-ct td:nth-child(n+2) {
	width: 140px;
	white-space: nowrap;
}

#sp-report-table-asset th:nth-child(2),
#sp-report-table-asset td:nth-child(2) {
	width: 90px;
	white-space: nowrap;
}

#sp-report-table-asset th:nth-child(3),
#sp-report-table-asset td:nth-child(3) {
	width: 120px;
	white-space: nowrap;
}

.sp-slow-query-card,
.sp-rec-card {
	background: #ffffff;
	border-radius: 4px;
	overflow: visible;
	padding: 16px;
	border: 1px solid var(--border-soft);
}

.sp-slow-query-card .sp-card__header,
.sp-rec-card .sp-card__header {
	padding: 0;
	background: transparent;
	border-bottom: 0;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
}

.sp-slow-query-card .sp-card__body,
.sp-rec-card .sp-card__body {
	padding: 10px 0 0;
}

.sp-rec-card--danger {
	border-left: 4px solid var(--danger);
	padding-left: 12px;
}

.sp-rec-card--warning {
	border-left: 4px solid #dba617;
	padding-left: 12px;
}

.sp-rec-fix {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--border-soft);
}

@media (max-width: 1100px) {

  .sp-page--wide .sp-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

  #sp-report-memory-timeline {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

}


@media (max-width: 782px) {

  .sp-page--wide .sp-page-header {
		flex-direction: column;
		align-items: center;
	}

  .sp-page--wide .sp-grid--4 {
		grid-template-columns: 1fr;
	}

}


@media (max-width: 600px) {

  .sp-page--wide .sp-page-title {
		font-size: 28px;
	}

  .sp-score {
		grid-template-columns: 1fr;
		align-items: flex-start;
	}

  .sp-score__value {
		font-size: 24px;
	}

  .sp-score__label {
		font-size: 15px;
	}

  .sp-table {
		min-width: 560px;
	}

  #sp-report-memory-timeline {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

  #sp-report-tabs-body .sp-table {
		min-width: 620px;
	}

}


/* =============================================
   Filter, detail, and checkbox patterns
   ============================================= */
.sp-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	margin-bottom: 18px;
}

.sp-filter-field {
	flex: 1 1 180px;
	min-width: 180px;
}

.sp-filter-field input,
.sp-filter-field select {
	width: 100%;
	box-sizing: border-box;
}

.sp-filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.spat-pagination,
.spat-submit-row,
.spat-unlock-form .spat-submit-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.spat-pagination {
	margin-top: 16px;
	justify-content: flex-end;
}

.spat-pagination .disabled {
	pointer-events: none;
	opacity: 0.45;
}

.sp-cell-stack {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sp-detail-row td {
	padding: 0;
	background: var(--surface-muted);
}

.sp-detail-body {
	display: grid;
	gap: 14px;
	padding: 16px 18px;
}

.sp-detail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.sp-detail-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sp-detail-meta strong {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.sp-checkbox-stack {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}

.sp-checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.sp-checkbox-row input[type="checkbox"] {
	margin: 2px 0 0;
}

.sp-checkbox-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
}

.sp-checkbox-action input[type="checkbox"] {
	margin: 0;
}

.spat-allowlist {
	display: grid;
	gap: 10px;
}

.spat-allowlist__item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: center;
    align-content: center;
}

.spat-unlock-form {
	max-width: 560px;
}

@media (max-width: 782px) {

  .sp-filter-form,
.spat-pagination,
.spat-submit-row {
		justify-content: stretch;
	}

  .sp-filter-actions,
.spat-pagination a,
.spat-submit-row .button {
		width: 100%;
	}

}


/* =============================================
   Runtime toast feedback
   ============================================= */

/* Keep only transient feedback UI here. Core page layout and card styling live in the shared component layer above. */

.sp-toast-stack {
  position: fixed;
  top: 46px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
}

.sp-toast {
  position: relative;
  padding: 14px 42px 14px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--primary, #2271b1);
  background: var(--surface, #ffffff);
  color: var(--text, #1d2327);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.sp-toast--success {
  border-left-color: var(--success, #00a32a);
}

.sp-toast--warning {
  border-left-color: var(--warning, #996800);
}

.sp-toast--error {
  border-left-color: var(--danger, #d63638);
}

.sp-toast__body {
  font-size: 13px;
  line-height: 1.5;
}

.sp-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted, #50575e);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.sp-toast__close:hover {
  color: var(--text, #1d2327);
}

@media (max-width: 782px) {

  .sp-toast-stack {
    top: 32px;
    right: 12px;
    left: 12px;
    width: auto;
  }

}


.sp-status-reason {
  margin-top: 4px;
  font-size: 12px;
  color: #826200;
  line-height: 1.3;
}

/* =============================================
   Wide structured data grids
   ============================================= */

/* Keep these grid tables full width and align the trailing action columns consistently. */
#sprsc-post-types-table,
#sprsc-taxonomies-table,
#sprsc-plugin-reset-table,
#sprsc-plugin-activation-table {
    display: block;
    width: 100%;
    border-collapse: collapse;
}

#sprsc-post-types-table thead,
#sprsc-post-types-table tbody,
#sprsc-taxonomies-table thead,
#sprsc-taxonomies-table tbody,
#sprsc-plugin-reset-table thead,
#sprsc-plugin-reset-table tbody,
#sprsc-plugin-activation-table thead,
#sprsc-plugin-activation-table tbody {
    display: block;
    width: 100%;
}

#sprsc-post-types-table tr,
#sprsc-taxonomies-table tr,
#sprsc-plugin-activation-table tr {
    display: grid;
    width: 100%;
    min-width: 1152px;
    grid-template-columns: 288px minmax(576px, 1fr) 128px 160px;
}

#sprsc-plugin-reset-table tr {
    display: grid;
    width: 100%;
    min-width: 1352px;
    grid-template-columns: 288px minmax(556px, 1fr) 100px 120px 128px 160px;
}

#sprsc-post-types-table tr > *,
#sprsc-taxonomies-table tr > *,
#sprsc-plugin-reset-table tr > *,
#sprsc-plugin-activation-table tr > * {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
}

#sprsc-post-types-table tr > :nth-child(3),
#sprsc-taxonomies-table tr > :nth-child(3),
#sprsc-plugin-activation-table tr > :nth-child(3),
#sprsc-post-types-table tr > :nth-child(4),
#sprsc-taxonomies-table tr > :nth-child(4),
#sprsc-plugin-activation-table tr > :nth-child(4) {
    white-space: nowrap;
}

#sprsc-plugin-reset-table thead th:nth-child(4) {
    white-space: nowrap;
}

.sprsc-col-key,
.sprsc-col-plugin { width: 288px; }

.sprsc-col-label,
.sprsc-col-file { width: 576px; }

.sprsc-col-metric { width: 100px; }

.sprsc-col-metric-wide { width: 120px; }

.sprsc-col-count,
.sprsc-col-status,
.sprsc-col-penult { width: 128px; }

.sprsc-col-toggle { width: 160px; }

/* =============================================
   Fingerprint display and link feedback
   ============================================= */

.spml-fingerprint-hash-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	margin-bottom: 8px;
}

.spml-fingerprint-hash-label {
	color: #50575e;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.spml-fingerprint-hash-hint {
	color: #50575e;
	font-size: 12px;
}

.spml-fp-hash-display {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 12px;
	letter-spacing: 0.02em;
	word-break: break-word;
	overflow-wrap: anywhere;
	background: #fbfbfc;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 10px 12px;
	margin: 0;
	color: #1d2327;
	line-height: 1.55;
}

.spml-fingerprint-public-link {
	display: block;
	margin-top: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 12px;
	overflow-wrap: anywhere;
}

.spml-failed-highlight {
	color: #d63638;
	font-weight: 600;
}

.spml-inline-form {
	margin: 0;
}

.sp-empty {
	margin: 0px;
	padding: 16px 18px;
	color: var(--muted);
}

/* =============================================
   Transfer / Progress Cards
   ============================================= */

.sp-transfer-section {
	margin-bottom: 20px;
}

.sp-transfer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 12px;
}

.sp-transfer-card {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 6px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sp-transfer-card--running {
	border-left: 3px solid var(--primary);
}

.sp-transfer-card--done {
	border-left: 3px solid var(--success);
}

.sp-transfer-card--error {
	border-left: 3px solid var(--danger);
}

.sp-transfer-card--cancelled {
	border-left: 3px solid var(--neutral);
	opacity: 0.7;
}

.sp-transfer-card__title {
	font-weight: 600;
	font-size: 13px;
	color: var(--text);
}

.sp-transfer-card__message {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.4;
}

.sp-transfer-card__meta {
	font-size: 12px;
	color: var(--neutral);
}

.sp-transfer-card__bar {
	height: 8px;
	background: var(--surface-alt);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.sp-transfer-card__bar > span {
	display: block;
	height: 100%;
	background: var(--primary);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.sp-transfer-card--done .sp-transfer-card__bar > span {
	background: var(--success);
}

.sp-transfer-card--error .sp-transfer-card__bar > span {
	background: var(--danger);
}

.sp-transfer-card__bar.is-indeterminate > span {
	width: 30% !important;
	animation: sp-indeterminate 1.4s ease-in-out infinite;
}

@keyframes sp-indeterminate {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(430%); }
}

.sp-transfer-card__percent {
	font-size: 12px;
	font-weight: 600;
	color: var(--primary);
	text-align: right;
}

.sp-transfer-card--done .sp-transfer-card__percent {
	color: var(--success);
}

.sp-transfer-card__actions {
	margin-top: 2px;
}

.sp-transfer-panel {
	border: none;
	box-shadow: none;
	background: transparent;
}

.sp-transfer-panel > .sp-card__body {
	padding: 0;
}

/* Utility overrides stay near the end of the file so they can intentionally win the cascade. */
.sp-u-mt-0 {
	margin-top: 0;
}

.sp-u-mt-6 {
	margin-top: 6px;
}

.sp-u-mt-10 {
	margin-top: 10px;
}

.sp-u-mt-12 {
	margin-top: 12px;
}

.sp-u-mb-12 {
	margin-bottom: 12px;
}

.sp-u-max-w-none {
	max-width: none;
}

/* ── Site Detail Panel ─────────────────────────────── */

.sp-site-detail {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	margin-top: 12px;
	padding: 20px;
}

.sp-site-detail__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.sp-site-detail__identity {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.sp-site-detail__identity-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sp-site-detail__icon {
	font-size: 20px;
	color: #787c82;
}

.sp-site-detail__identity-row strong {
	font-size: 15px;
	font-weight: 600;
}

.sp-site-detail__url {
	color: #2271b1;
	font-size: 13px;
	text-decoration: none;
	word-break: break-all;
}

.sp-site-detail__url:hover {
	text-decoration: underline;
}

.sp-site-detail__meta {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: #787c82;
}

.sp-site-detail__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.sp-site-detail__actions-sep {
	display: inline-block;
	width: 1px;
	height: 24px;
	background: #dcdcde;
	margin: 0 4px;
}

.sp-site-detail__cards {
	margin-top: 16px;
}

.sp-site-detail__card {
	padding: 14px;
}

/* backup monitor */
.sp-grid--3 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.sp-grid--3 > :first-child {
    grid-column: span 6;
}

.sp-grid--3 > :not(:first-child) {
    grid-column: span 3;
}
/* backup monitor */

.sp-site-detail__card-heading {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 10px;
	color: #1d2327;
}

.sp-site-detail__card-heading .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #787c82;
}

.sp-site-detail__card-content {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sp-site-detail__card-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	gap: 8px;
}

.sp-site-detail__card-label {
	color: #787c82;
	flex-shrink: 0;
}

.sp-site-detail__card-value {
	color: #1d2327;
	text-align: right;
	word-break: break-word;
}

.sp-site-detail__card-divider {
	border: none;
	border-top: 1px solid #f0f0f1;
	margin: 10px 0 8px;
}

.sp-site-detail__card-secondary {
	font-size: 12px;
	color: #787c82;
}

.sp-site-detail__toggle-row {
	display: flex;
	justify-content: center;
	margin-top: 16px;
}

.sp-site-detail__divider {
	border: none;
	border-top: 1px solid #dcdcde;
	margin: 12px 0 0;
}

.sp-site-detail__history {
	margin-top: 12px;
}

.sp-site-detail__history-panels {
	gap: 16px;
}

.sp-site-detail__history-panel {
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.sp-site-detail__history-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.sp-site-detail__history-panel-header strong {
	font-size: 13px;
}

.sp-site-detail__empty {
	font-size: 13px;
	color: #787c82;
	font-style: italic;
	margin: 4px 0;
}

.sp-site-detail .sp-table--compact {
	font-size: 12px;
}

.sp-site-detail .sp-table--compact th,
.sp-site-detail .sp-table--compact td {
	padding: 5px 8px;
}

.sp-btn--danger-text {
	color: #d63638 !important;
	border-color: #d63638 !important;
}

.sp-btn--danger-text:hover {
	background: #d63638 !important;
	color: #fff !important;
}

.sp-site-detail-toggle.is-active svg {
	color: #2271b1;
}
