.altify-ai-settings-form {
	max-width: none;
	width: 100%;
}

.altify-ai-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
	margin-bottom: 14px;
}

.altify-ai-tab {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
}

.altify-ai-tab:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.altify-ai-tab.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.altify-ai-preset-wrap {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 14px 16px;
	margin: 12px 0 18px;
}

.altify-ai-preset-wrap h2 {
	margin-top: 0;
	margin-bottom: 8px;
}

.altify-ai-preset-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 8px;
}

.altify-ai-inline-message {
	margin-top: 8px;
	font-weight: 600;
}

.altify-ai-test-api-wrap {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.altify-ai-test-api-result {
	font-weight: 600;
}

.altify-ai-panel {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 18px;
	margin-top: 16px;
	max-width: 980px;
}

.altify-ai-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin-top: 12px;
	margin-bottom: 12px;
}

.altify-ai-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.altify-ai-field input,
.altify-ai-field select {
	width: 100%;
}

.altify-ai-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.altify-ai-status {
	font-weight: 600;
}

.altify-ai-counters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 14px;
}

.altify-ai-summary {
	border: 1px solid #dcdcde;
	background: #fff;
	padding: 12px;
	margin-bottom: 14px;
}

.altify-ai-summary h3 {
	margin: 0 0 8px;
}

.altify-ai-summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 8px 14px;
}

.altify-ai-summary-grid strong {
	word-break: break-word;
}

.altify-ai-log-wrap h3 {
	margin: 0 0 8px;
}

.altify-ai-log-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.altify-ai-log-controls label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}

.altify-ai-log-panel {
	border: 1px solid #dcdcde;
	background: #fff;
	padding: 0;
	min-height: 240px;
	max-height: 360px;
	overflow: auto;
}

.altify-ai-log-table {
	min-width: 1060px;
	margin: 0;
}

.altify-ai-log-table th,
.altify-ai-log-table td {
	font-size: 12px;
	line-height: 1.45;
	vertical-align: top;
}

.altify-ai-log-table td:nth-child(7),
.altify-ai-log-table td:nth-child(8) {
	word-break: break-word;
	max-width: 320px;
}

.altify-ai-log-table .check-column {
	width: 42px;
}

.altify-ai-log-table .no-items td {
	text-align: center;
	color: #646970;
}

.altify-ai-automation-panel {
	border-top: 4px solid #2271b1;
}

.altify-ai-automation-header h2 {
	margin-top: 0;
	margin-bottom: 6px;
}

.altify-ai-automation-header p {
	margin-top: 0;
	color: #50575e;
}

.altify-ai-automation-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.altify-ai-automation-card {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 16px;
	background: #fff;
}

.altify-ai-toggle-wrapper {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.altify-ai-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
	margin-top: 2px;
}

.altify-ai-switch input[type="checkbox"] {
	opacity: 0;
	width: 0;
	height: 0;
}

.altify-ai-slider {
	position: absolute;
	inset: 0;
	cursor: pointer;
	background: #8c8f94;
	border-radius: 24px;
	transition: all 0.2s ease;
}

.altify-ai-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.altify-ai-switch input[type="checkbox"]:checked + .altify-ai-slider {
	background: #2271b1;
}

.altify-ai-switch input[type="checkbox"]:checked + .altify-ai-slider::before {
	transform: translateX(18px);
}

.altify-ai-switch input[type="checkbox"]:focus-visible + .altify-ai-slider {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.altify-ai-toggle-text {
	display: flex;
	flex-direction: column;
}

.altify-ai-main-label {
	font-weight: 600;
	display: block;
	margin-bottom: 2px;
}

.altify-ai-indent {
	margin-left: 54px;
	margin-top: 14px;
}

.altify-ai-automation-inline-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.altify-ai-automation-status-wrap {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f8f9fa;
	padding: 14px 16px;
	margin-top: 18px;
}

.altify-ai-automation-status-wrap h3 {
	margin: 0 0 10px;
}

.altify-ai-automation-status-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px 16px;
}

.altify-ai-status-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.altify-ai-status-label {
	font-size: 11px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

@media (max-width: 782px) {
	.altify-ai-indent {
		margin-left: 0;
	}
}

.altify-ai-modern-form {
	--altify-bg-card: #fff;
	--altify-border: #c3c4c7;
	--altify-border-light: #dcdde1;
	--altify-text-main: #1d2327;
	--altify-text-muted: #50575e;
	--altify-primary: #2271b1;
	--altify-primary-hover: #135e96;
	background: transparent;
}

.altify-ai-modern-form .altify-ai-card {
	background: var(--altify-bg-card);
	border: 1px solid var(--altify-border);
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.altify-ai-modern-form .altify-ai-card-hero {
	border-top: 4px solid var(--altify-primary);
}

.altify-ai-modern-form h2 {
	margin-top: 0;
	margin-bottom: 10px;
}

.altify-ai-helper-text {
	color: var(--altify-text-muted);
	font-size: 13px;
	display: block;
	margin-top: 4px;
}

.altify-ai-card-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.altify-ai-mode-card-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
	margin-top: 12px;
}

.altify-ai-mode-card {
	border: 2px solid var(--altify-border-light);
	border-radius: 4px;
	padding: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background: #fff;
}

.altify-ai-mode-card input[type="radio"] {
	position: absolute;
	opacity: 0;
}

.altify-ai-mode-card h3 {
	margin: 0 0 6px;
	color: var(--altify-primary);
	font-size: 16px;
}

.altify-ai-mode-card.is-active {
	border-color: var(--altify-primary);
	background: #f3f8fc;
	box-shadow: 0 0 0 1px var(--altify-primary);
}

.altify-ai-grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px 18px;
}

.altify-ai-grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px;
}

.altify-ai-modern-form .altify-ai-field label {
	font-weight: 600;
	margin-bottom: 6px;
}

.altify-ai-modern-form input[type="text"],
.altify-ai-modern-form input[type="password"],
.altify-ai-modern-form input[type="number"],
.altify-ai-modern-form select {
	width: 100%;
	max-width: 420px;
	padding: 7px 10px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	background: #fff;
	color: var(--altify-text-main);
}

.altify-ai-modern-form .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	border-radius: 3px;
	border: 1px solid transparent;
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.altify-ai-modern-form .button.button-primary {
	background: var(--altify-primary);
	color: #fff;
	border-color: var(--altify-primary);
}

.altify-ai-modern-form .button.button-primary:hover {
	background: var(--altify-primary-hover);
	border-color: var(--altify-primary-hover);
}

.altify-ai-modern-form .button.button-secondary {
	background: #f6f7f7;
	color: var(--altify-text-main);
	border-color: var(--altify-border);
}

.altify-ai-modern-form .button.button-secondary:hover {
	background: #eef0f1;
}

.altify-ai-row-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.altify-ai-preset-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--altify-border-light);
	border-radius: 4px;
	background: #fafafa;
	cursor: pointer;
	text-align: left;
}

.altify-ai-preset-card:hover {
	border-color: var(--altify-primary);
	background: #fff;
}

.altify-ai-preset-card.is-active {
	border-color: var(--altify-primary);
	background: #f3f8fc;
}

.altify-ai-preset-card strong {
	color: var(--altify-primary);
}

.altify-ai-preset-card span {
	font-size: 12px;
	color: var(--altify-text-muted);
}

.altify-ai-toggle-control {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 6px 0;
}

.altify-ai-accordion {
	border: 1px solid var(--altify-border-light);
	border-radius: 4px;
	margin-top: 16px;
	background: #fff;
}

.altify-ai-accordion-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: #fafafa;
	border: 0;
	border-bottom: 1px solid transparent;
	text-align: left;
	font-weight: 600;
	cursor: pointer;
}

.altify-ai-accordion.open .altify-ai-accordion-header {
	border-bottom-color: var(--altify-border-light);
}

.altify-ai-accordion-icon {
	transition: transform 0.2s ease;
}

.altify-ai-accordion.open .altify-ai-accordion-icon {
	transform: rotate(180deg);
}

.altify-ai-accordion-content {
	padding: 14px;
}

.altify-ai-save-wrap {
	position: sticky;
	bottom: 10px;
	display: flex;
	justify-content: flex-end;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(4px);
	border: 1px solid var(--altify-border);
	border-radius: 4px;
	padding: 10px 12px;
}

.altify-ai-save-button {
	min-width: 140px;
}

@media (max-width: 782px) {
	.altify-ai-card-header-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.altify-ai-save-wrap {
		position: static;
		margin-top: 12px;
	}
}

/* ==========================================================================
   Settings Screen Layout (Custom UI)
   ========================================================================== */

body.toplevel_page_altify-ai-settings .wrap,
body.altify-ai_page_altify-ai-history .wrap,
body.settings_page_altify-ai-settings .wrap {
	max-width: none !important;
	margin-right: 20px;
	margin-left: 0;
}

#altify-ai-settings-form {
	max-width: none;
	width: 100%;
}

.altify-wrap {
	--bg-body: #f0f0f1;
	--bg-card: #ffffff;
	--text-main: #1d2327;
	--text-muted: #50575e;
	--border-color: #c3c4c7;
	--border-light: #dcdde1;
	--primary: #2271b1;
	--primary-hover: #135e96;
	--success: #00a32a;
	--warning: #dba617;
	--warning-light: #fcf0d1;
	--danger: #d63638;
	--danger-hover: #b32d2e;
	--highlight: #f6f7f7;
	--focus-ring: rgba(34, 113, 177, 0.25);
	max-width: none;
	width: 100%;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-main);
	padding-bottom: 100px;
}

.altify-wrap,
.altify-wrap * {
	box-sizing: border-box;
}

.altify-wrap h1,
.altify-wrap h2,
.altify-wrap h3,
.altify-wrap h4 {
	font-weight: 600;
	color: var(--text-main);
}

.altify-wrap h1 {
	font-size: 24px;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 5px;
}

.altify-wrap h1 svg {
	color: #2271b1;
}

.altify-wrap h2 {
	font-size: 18px;
	margin: 0 0 15px;
	border-bottom: 1px solid var(--border-light);
	padding-bottom: 10px;
}

.altify-wrap h3 {
	font-size: 15px;
	margin: 0 0 8px;
}

.altify-wrap .subtitle {
	font-size: 15px;
	color: var(--text-muted);
	margin: 0 0 24px;
}

.altify-wrap .helper-text {
	color: var(--text-muted);
	font-size: 13px;
	font-style: normal;
	margin-top: 4px;
	display: block;
}

.altify-wrap .subtle-text {
	color: var(--text-muted);
}

.altify-wrap .altify-card {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	width: 100%;
}

.altify-wrap .altify-card-hero {
	border-top: 4px solid var(--primary);
}

.altify-wrap .grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.altify-wrap .grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.altify-wrap .mode-card-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 15px;
}

.altify-wrap .mode-card {
	border: 2px solid var(--border-light);
	border-radius: 4px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background: #fff;
}

.altify-wrap .mode-card:hover {
	border-color: var(--border-color);
}

.altify-wrap .mode-card.active {
	border-color: var(--primary);
	background: #f3f8fc;
	box-shadow: 0 0 0 1px var(--primary);
}

.altify-wrap .mode-card input[type="radio"] {
	position: absolute;
	opacity: 0;
}

.altify-wrap .mode-card h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	color: var(--primary);
}

.altify-wrap .mode-card.active h3::after {
	content: "✓";
	background: var(--primary);
	color: #fff;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	margin-left: auto;
}

.altify-wrap .form-row {
	margin-bottom: 20px;
}

.altify-wrap .form-row:last-child {
	margin-bottom: 0;
}

.altify-wrap .main-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.altify-wrap input[type="text"],
.altify-wrap input[type="password"],
.altify-wrap input[type="number"],
.altify-wrap input[type="time"],
.altify-wrap select {
	width: 100%;
	max-width: 400px;
	padding: 6px 10px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-main);
	background-color: #fff;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
	transition: all 0.2s ease;
}

.altify-wrap input:focus,
.altify-wrap select:focus {
	border-color: var(--primary);
	outline: 2px solid var(--focus-ring);
	outline-offset: 1px;
}

.altify-wrap .toggle-wrapper {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}

.altify-wrap .toggle-text {
	display: flex;
	flex-direction: column;
}

.altify-wrap .switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
	margin-top: 2px;
}

.altify-wrap .switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.altify-wrap .slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #8c8f94;
	transition: 0.3s;
	border-radius: 22px;
}

.altify-wrap .slider::before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	transition: 0.3s;
	border-radius: 50%;
}

.altify-wrap input:checked + .slider {
	background-color: var(--primary);
}

.altify-wrap input:focus-visible + .slider {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.altify-wrap input:checked + .slider::before {
	transform: translateX(18px);
}

.altify-wrap .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	line-height: 2;
	text-decoration: none;
	border-radius: 3px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.altify-wrap .button:focus-visible,
.altify-ai-settings-form .sticky-footer .button:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.altify-wrap .button.button-primary,
.altify-ai-settings-form .sticky-footer .button.button-primary {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.altify-wrap .button.button-primary:hover,
.altify-ai-settings-form .sticky-footer .button.button-primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
	color: #fff;
}

.altify-wrap .button.button-secondary,
.altify-ai-settings-form .sticky-footer .button.button-secondary {
	background: var(--highlight);
	color: var(--text-main);
	border-color: var(--border-color);
}

.altify-wrap .button.button-secondary:hover,
.altify-ai-settings-form .sticky-footer .button.button-secondary:hover {
	background: var(--bg-body);
	border-color: #8c8f94;
}

.altify-wrap .button.button-danger,
.altify-ai-settings-form .sticky-footer .button.button-danger {
	background: transparent;
	color: var(--danger);
	border-color: var(--danger);
}

.altify-wrap .button.button-danger:hover,
.altify-ai-settings-form .sticky-footer .button.button-danger:hover {
	background: var(--danger);
	border-color: var(--danger);
	color: #fff;
}

.altify-wrap .button.button-success {
	background: var(--success);
	color: #fff;
	border-color: var(--success);
}

.altify-wrap .button.button-success:hover {
	background: #008a23;
	border-color: #008a23;
}

.altify-wrap .altify-ai-save-start {
	font-size: 15px;
	padding: 8px 24px;
	line-height: 1.4;
}

.altify-wrap .preset-card {
	border: 1px solid var(--border-light);
	border-radius: 4px;
	padding: 12px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fafafa;
}

.altify-wrap .preset-card:hover {
	border-color: var(--primary);
	background: #fff;
}

.altify-wrap .preset-card.is-active {
	border-color: var(--primary);
	background: #f3f8fc;
}

.altify-wrap .preset-card h4 {
	color: var(--primary);
	margin: 0 0 4px;
	font-size: 14px;
}

.altify-wrap .preset-card p {
	font-size: 12px;
	color: var(--text-muted);
	margin: 0;
	line-height: 1.3;
}

.altify-wrap .status-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	background: #f8f9fa;
	border: 1px solid var(--border-light);
	border-radius: 4px;
	padding: 12px 16px;
	margin-bottom: 20px;
}

.altify-wrap .status-item {
	font-size: 13px;
}

.altify-wrap .status-item strong {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	color: var(--text-muted);
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.altify-wrap .accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	background: #fafafa;
	border: 1px solid var(--border-light);
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s ease;
	width: 100%;
	text-align: left;
}

.altify-wrap .accordion-header:hover {
	background: #f0f0f1;
}

.altify-wrap .accordion-icon {
	transition: transform 0.3s ease;
}

.altify-wrap .accordion-content {
	display: none;
	padding: 20px;
	border: 1px solid var(--border-light);
	border-top: none;
	border-radius: 0 0 4px 4px;
	background: #fff;
}

.altify-wrap .accordion.open .accordion-icon {
	transform: rotate(180deg);
}

.altify-wrap .accordion.open .accordion-content {
	display: block;
}

.altify-wrap .accordion-content[hidden] {
	display: none !important;
}

.altify-wrap .altify-notice {
	background: #fff;
	border-left: 4px solid var(--primary);
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 12px 15px;
	margin-bottom: 20px;
}

.altify-wrap .altify-notice p {
	margin: 0;
	font-size: 13px;
}

.altify-wrap .altify-notice-warning {
	border-left-color: var(--warning);
	background: var(--warning-light);
}

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

.altify-wrap .wp-list-table.altify-settings-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: 4px;
}

.altify-wrap .wp-list-table.altify-settings-table th,
.altify-wrap .wp-list-table.altify-settings-table td {
	padding: 10px;
	text-align: left;
	border-bottom: 1px solid var(--border-light);
	font-size: 13px;
	vertical-align: top;
}

.altify-wrap .wp-list-table.altify-settings-table th {
	background: #f6f7f7;
	font-weight: 600;
	color: var(--text-main);
}

.altify-wrap .wp-list-table.altify-settings-table tbody tr:nth-child(even) {
	background-color: #fcfcfc;
}

.altify-wrap .wp-list-table.altify-settings-table .check-col {
	width: 32px;
}

.altify-wrap .badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
}

.altify-wrap .badge-success {
	background: #e6f6e9;
	color: var(--success);
}

.altify-wrap .badge-danger {
	background: #fbe4e5;
	color: var(--danger);
}

.altify-wrap .badge-muted {
	background: #eee;
	color: #666;
}

.altify-wrap .history-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	gap: 12px;
}

.altify-wrap .history-title {
	border: none;
	margin: 0;
	padding: 0;
}

.altify-wrap .history-subtitle {
	margin-top: 2px;
}

.altify-wrap .altify-card-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 15px;
}

.altify-wrap .altify-mb-0 {
	margin-bottom: 0;
}

.altify-wrap .toggle-inline {
	align-items: center;
}

.altify-wrap .toggle-inline .main-label {
	margin: 0;
}

.altify-wrap .altify-inline-status {
	font-weight: 600;
	min-height: 18px;
}

.altify-wrap .altify-inline-custom-language {
	margin-top: 8px;
}

.altify-wrap .altify-ai-test-api-result {
	margin-top: 8px;
	font-weight: 600;
	font-size: 13px;
}

.altify-wrap .flex-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.altify-wrap .indent {
	margin-left: 52px;
}

.altify-wrap .split-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.altify-wrap .mt-4 {
	margin-top: 24px;
}

.altify-wrap .mb-2 {
	margin-bottom: 10px;
}

.altify-wrap hr {
	border: 0;
	border-top: 1px solid var(--border-light);
	margin: 24px 0;
}

.altify-ai-settings-form .sticky-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(5px);
	border-top: 1px solid #c3c4c7;
	padding: 15px 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
	opacity: 0;
	transform: translateY(110%);
	pointer-events: none;
	transition: transform 0.24s ease, opacity 0.24s ease;
}

.altify-ai-settings-form .sticky-footer.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.altify-ai-settings-form .sticky-footer .footer-inner {
	width: 100%;
	max-width: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.altify-ai-settings-form .sticky-footer .flex-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.altify-ai-settings-form .sticky-footer .unsaved-hint {
	color: #dba617;
	font-weight: 600;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
	opacity: 0;
	transition: opacity 0.3s;
}

.altify-ai-settings-form .sticky-footer .unsaved-hint.visible {
	opacity: 1;
}

.altify-ai-settings-form .sticky-footer .altify-save-message {
	color: #2271b1;
	font-weight: 600;
	font-size: 13px;
	min-height: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.altify-ai-settings-form .sticky-footer .altify-save-message.is-visible {
	opacity: 1;
}

.altify-ai-settings-form .sticky-footer .altify-save-button {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	font-size: 14px;
	padding: 8px 24px;
	line-height: 1.4;
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #fff !important;
}

#altify-save-settings {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.altify-wrap .no-history-cell {
	text-align: center;
	color: #666;
}

@media (max-width: 960px) {
	.altify-wrap .grid-2,
	.altify-wrap .grid-3,
	.altify-wrap .mode-card-container {
		grid-template-columns: 1fr;
	}

	.altify-wrap .split-grid {
		grid-template-columns: 1fr;
	}

	.altify-wrap .indent {
		margin-left: 0;
	}
}

@media (max-width: 782px) {
	.altify-wrap .status-row {
		flex-direction: column;
		gap: 10px;
	}

	.altify-wrap .history-header,
	.altify-wrap .altify-card-header-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.altify-ai-settings-form .sticky-footer .footer-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.altify-ai-settings-form .sticky-footer {
		padding: 12px 14px;
	}
}
