.wpps-settings-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; padding: 0; background: none; border: none; align-items: center; }
.wpps-settings-tab { margin: 0; padding: 10px 16px; border: none; background: none; border-radius: 0; cursor: pointer; font-weight: 600; font-size: 13px; color: #50575e; box-shadow: none; border-bottom: 2px solid transparent; }
.wpps-settings-tab:hover { color: #1d2327; }
.wpps-settings-tab { border-radius: 0; }
.wpps-settings-tab.is-active { color: var(--wp-admin-theme-color, #2271b1); border-bottom-color: var(--wp-admin-theme-color, #2271b1); }
.wpps-config-save-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wpps-config-save-row input { width: 280px; }
.wpps-config-presets-table { margin-top: 12px; }
.wpps-config-import-mode { margin-right: 16px; }
.wp-powersuite-settings { max-width: none; width: 100%; box-sizing: border-box; }
.wp-powersuite-settings__card { margin-bottom: 20px; max-width: none; border: 1px solid #dcdcde; border-radius: 0; box-shadow: 0 10px 28px rgba(15,23,42,.05); }
.wpps-settings-card--section { overflow: hidden; }
.wpps-settings-section-title:not(.wpps-settings-section-title--danger) { color: var(--wp-admin-theme-color, #2271b1); margin-bottom: 4px; }
.wpps-settings-section-desc { color: #646970; font-size: 13px; margin: 0 0 16px 0; }
.wpps-settings-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 16px 0; border-bottom: 1px solid #f0f0f1; }
.wpps-settings-row:last-child { border-bottom: none; }
.wpps-settings-row__content { flex: 1; min-width: 0; }
.wpps-settings-row__label { display: block; margin-bottom: 4px; }
.wpps-settings-row__label--danger { color: #d63638; }
.wpps-settings-row__control { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.wpps-settings-row__control--solo { flex: 1; justify-content: flex-start; }
.wpps-settings-select { min-width: 200px; }
.wpps-interface-color-control { display: inline-flex; align-items: center; justify-content: flex-end; }
.wp-powersuite-settings .wpps-settings-toggle input[type="checkbox"] {
	accent-color: var(--wp-admin-theme-color, #2271b1);
}
.wpps-btn-warning { background: #fcf0e3; border-color: #dba617; color: #1d2327; }
.wpps-btn-warning:hover { background: #f5e6c8; border-color: #c49000; }
.wpps-btn-danger { background: #fce8e8; border-color: #d63638; color: #d63638; }
.wpps-btn-danger:hover { background: #f8d7da; border-color: #b32d2e; color: #b32d2e; }
.wpps-settings-card--danger-zone {
	border: 2px solid #d63638;
	background: #fff5f5;
	box-shadow: none;
}
.wpps-settings-section-title--danger { color: #b32d2e; }
.wpps-settings-section-desc--danger { color: #8a2424; }
.wpps-settings-row--danger { padding: 20px 0; }
.wpps-settings-row--danger-last { border-bottom: none; }
.wpps-btn-danger-zone {
	min-height: 36px;
	padding: 6px 16px;
	font-weight: 600;
}
.wpps-btn-danger-zone--primary {
	min-height: 40px;
	padding: 8px 18px;
	font-size: 14px;
	border-width: 2px;
}
.wpps-settings-confirm-input {
	width: 100%;
	margin: 12px 0 0 0;
	box-sizing: border-box;
}
.wpps-settings-confirm-hint {
	margin: 12px 0 0 0;
	font-size: 13px;
	color: #646970;
}
.wpps-settings-feedback { display: inline-flex; align-items: center; margin: 0; font-weight: 600; max-width: min(100%, 380px); line-height: 1.35; }
.wpps-settings-inline-notice { margin: 0 0 16px 0; }
.wpps-settings-confirm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.wpps-settings-confirm-dialog {
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	max-width: 480px;
	width: 100%;
	padding: 20px 24px;
}
.wpps-settings-confirm-message {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}
.wpps-settings-confirm-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
@media (max-width: 782px) {
	.wpps-settings-row { display: block; }
	.wpps-settings-row__control { margin-top: 12px; }
}

/* White Label tab */
.wpps-white-label-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) min(340px, 100%);
	gap: 20px;
	align-items: start;
}

.wpps-white-label-main {
	min-width: 0;
}

.wpps-white-label-notice {
	margin: 0 0 16px;
}

.wpps-white-label-fields {
	display: grid;
	gap: 18px;
	margin-top: 8px;
}

.wpps-white-label-field__label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-white-label-field .description {
	margin: 0 0 8px;
}

.wpps-white-label-input {
	display: block;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

.wpps-white-label-input--textarea {
	min-height: 88px;
	resize: vertical;
}

.wpps-white-label-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.wpps-white-label-stacked-fields {
	display: grid;
	gap: 18px;
	margin-top: 4px;
}

.wpps-white-label-stacked-fields .wpps-white-label-field-grid {
	margin-top: 0;
}

.wpps-white-label-field {
	margin: 0;
}

.wpps-white-label-toggle-row {
	margin-bottom: 4px;
}

.wpps-white-label-media-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

.wpps-white-label-media {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.wpps-white-label-media__label {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-white-label-media__box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 112px;
	min-height: 112px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	box-sizing: border-box;
}

.wpps-white-label-media__box img {
	display: block;
	width: 56px;
	height: 56px;
	max-width: 56px;
	max-height: 56px;
	object-fit: contain;
}

.wpps-white-label-media__placeholder {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #a7aaad;
}

.wpps-white-label-media__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.wpps-white-label-savebar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
	padding: 16px 20px;
	border: 1px solid #dcdcde;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.wpps-white-label-savebar__hint {
	color: #646970;
	font-size: 13px;
}

.wpps-white-label-direct-url {
	margin-top: 12px;
	padding: 12px 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.wpps-white-label-direct-url__label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.wpps-white-label-direct-url__field {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wpps-white-label-direct-url__input {
	flex: 1 1 280px;
	max-width: 100%;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
}

.wpps-white-label-recovery-note {
	margin-top: 8px !important;
}

.wpps-white-label-hide-row .wpps-settings-row__content {
	max-width: 720px;
}

.wpps-white-label-aside {
	position: sticky;
	top: 32px;
}

.wpps-white-label-preview-card__title {
	margin: 0 0 4px;
	font-size: 1.05em;
	font-weight: 600;
	color: #1d2327;
}

.wpps-white-label-preview-block {
	margin-top: 18px;
}

.wpps-white-label-preview-block__label {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #646970;
}

.wpps-white-label-preview-menu {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
}

.wpps-white-label-preview-menu__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.wpps-white-label-preview-menu__icon img {
	display: block;
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.wpps-white-label-preview-menu__icon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #fff;
}

.wpps-white-label-preview-menu__title {
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
}

.wpps-white-label-preview-hero {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--wpps-accent, var(--wp-admin-theme-color, #2271b1)) 0%, var(--wpps-accent-hover, var(--wp-admin-theme-color-darker-10, #135e96)) 100%);
	color: #fff;
}

.wpps-white-label-preview-hero__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .14);
	flex-shrink: 0;
}

.wpps-white-label-preview-hero__icon img {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.wpps-white-label-preview-hero__icon .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
	color: #fff;
}

.wpps-white-label-preview-hero__copy {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.wpps-white-label-preview-hero__copy strong {
	font-size: 15px;
	line-height: 1.25;
}

.wpps-white-label-preview-hero__copy span {
	font-size: 12px;
	line-height: 1.4;
	opacity: .92;
}

.wpps-white-label-preview-plugins {
	padding: 12px 14px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

.wpps-white-label-preview-plugins strong {
	display: block;
	font-size: 14px;
	color: #1d2327;
}

.wpps-white-label-preview-plugins p {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #50575e;
}

.wpps-white-label-preview-plugins cite {
	display: block;
	margin-top: 8px;
	font-style: normal;
	font-size: 12px;
	color: #646970;
}

@media (max-width: 1100px) {
	.wpps-white-label-layout {
		grid-template-columns: 1fr;
	}

	.wpps-white-label-aside {
		position: static;
		order: -1;
	}
}

@media (max-width: 782px) {
	.wpps-white-label-field-grid,
	.wpps-white-label-media-grid {
		grid-template-columns: 1fr;
	}
}

.wpps-ai-connections-providers {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

.wpps-ai-connections-provider {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
	padding: 18px 20px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpps-ai-connections-provider:hover {
	border-color: #c3c4c7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wpps-ai-connections-provider__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f0f1;
	flex-wrap: wrap;
}

.wpps-ai-connections-provider__title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wpps-ai-connections-provider__title {
	margin: 0;
	font-size: 15px;
	color: #1d2327;
}

.wpps-ai-connections-provider__status {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.wpps-ai-connections-provider__status.is-connected {
	background: #edfaef;
	color: #008a20;
}

.wpps-ai-connections-provider__status.is-disconnected {
	background: #fcf0f1;
	color: #b32d2e;
}

.wpps-ai-connections-default {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #50575e;
	margin: 0;
}

.wpps-ai-connections-provider__body > .description {
	margin: 0 0 10px;
}

.wpps-ai-connections-provider__body .wpps-settings-row__label {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-ai-connections-provider__body .regular-text {
	width: 100%;
	max-width: 520px;
	box-sizing: border-box;
	margin-top: 4px;
}

.wpps-ai-connections-provider__test {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.wpps-ai-connections-providers--network .wpps-ai-connections-provider {
	padding: 14px 16px;
}

.wpps-ai-connections-field-row {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr);
	gap: 24px;
	margin-bottom: 16px;
}

.wpps-ai-connections-field .wpps-settings-select,
.wpps-ai-connections-field .regular-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wpps-ai-connections-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.wpps-ai-connections-test-result {
	font-weight: 600;
	font-size: 13px;
}

.wpps-ai-connections-test-result.is-success {
	color: #008a20;
}

.wpps-ai-connections-test-result.is-error {
	color: #b32d2e;
}

.wpps-ai-connections-modules-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.wpps-ai-connections-modules-list li {
	margin: 0;
	padding: 4px 12px;
	background: #f0f0f1;
	border-radius: 999px;
	font-size: 13px;
	color: #3c434a;
}

.wpps-ai-connections-modules-list li::before {
	content: none;
}

.wpps-ai-connections-card + .wpps-settings-card--section {
	margin-top: 20px;
}

.wpps-ai-connections-modules-list + .description code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
}

.wpps-ai-connections-privacy,
.wpps-ai-connections-key-notice {
	margin-top: 12px;
}

@media (max-width: 782px) {
	.wpps-ai-connections-field-row {
		grid-template-columns: 1fr;
	}
}
