/**
 * Load More Anything — Cupertino x WordPress-Native Admin Design System
 *
 * Strictly scoped to `.ald-app` and `body.toplevel_page_ald_setting`.
 */

.ald-app,
.ald-modal-backdrop,
.ald-toast-stack {
	--ald-bg: #eceef2;
	--ald-surface: #ffffff;
	--ald-surface-subtle: #f4f6f9;
	--ald-surface-glass: rgba(255, 255, 255, 0.92);
	--ald-border: #cfd5df;
	--ald-border-strong: #858b94;
	--ald-border-hover: #50575e;
	--ald-divider: #dde1e8;

	--ald-text: #111827;
	--ald-text-secondary: #374151;
	--ald-text-muted: #4b5563;
	--ald-placeholder: #59616e;

	--ald-accent: var(--wp-admin-theme-color, #0066cc);
	--ald-accent-hover: var(--wp-admin-theme-color-darker-10, #004f9e);
	--ald-accent-soft: #e6f0fc;
	--ald-accent-ring: rgba(0, 102, 204, 0.28);

	--ald-success-bg: #dcfce7;
	--ald-success-border: #86efac;
	--ald-success-text: #14532d;

	--ald-pro-bg: #fef3c7;
	--ald-pro-border: #fcd34d;
	--ald-pro-text: #78350f;

	--ald-danger-bg: #fee2e2;
	--ald-danger-border: #fca5a5;
	--ald-danger-text: #991b1b;
	--ald-danger-solid: #c81e1e;

	--ald-radius-sm: 8px;
	--ald-radius-md: 12px;
	--ald-radius-lg: 16px;
	--ald-radius-pill: 999px;

	--ald-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
	--ald-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 4px 12px rgba(15, 23, 42, 0.04);
	--ald-shadow-modal: 0 24px 64px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.12);

	--ald-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	--ald-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

	font-family: var(--ald-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ald-text);
}

.ald-app,
.ald-app *,
.ald-modal-backdrop,
.ald-modal-backdrop * {
	box-sizing: border-box;
}

.ald-app [hidden] {
	display: none !important;
}

body.toplevel_page_ald_setting #wpcontent {
	padding-left: 0;
	background: #eceef2;
}

body.toplevel_page_ald_setting #wpbody-content {
	padding-bottom: 48px;
}

body.toplevel_page_ald_setting .wrap.ald-wrap {
	margin: 0;
}

body.toplevel_page_ald_setting #wpfooter {
	background: #eceef2;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ald-app .ald-mono {
	font-family: var(--ald-mono);
	font-size: 13px;
}

.ald-app .ald-tabular {
	font-variant-numeric: tabular-nums;
}

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

/* -------------------------------------------------------------------------- */
/* Frosted Sticky Topbar                                                      */
/* -------------------------------------------------------------------------- */

.ald-topbar {
	position: sticky;
	top: 32px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
	padding: 12px 28px;
	background: var(--ald-surface-glass);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--ald-border);
}

.ald-topbar__left,
.ald-topbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ald-brand-mark {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: linear-gradient(135deg, #0066cc 0%, #2563eb 100%);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
	flex-shrink: 0;
}

.ald-brand-mark .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

.ald-brand-copy {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ald-brand-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ald-text);
}

.ald-brand-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ald-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: var(--ald-radius-pill);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.ald-badge--neutral {
	background: #e5e7eb;
	color: #374151;
}

.ald-badge--free {
	background: var(--ald-accent-soft);
	color: var(--ald-accent-hover);
}

.ald-badge--pro {
	background: var(--ald-pro-bg);
	color: var(--ald-pro-text);
	border: 1px solid var(--ald-pro-border);
}

.ald-save-state {
	font-size: 13px;
	font-weight: 500;
	color: var(--ald-text-muted);
	padding: 4px 10px;
	border-radius: var(--ald-radius-pill);
}

.ald-save-state.is-dirty {
	background: var(--ald-pro-bg);
	color: var(--ald-pro-text);
}

.ald-save-state.is-saved {
	background: var(--ald-success-bg);
	color: var(--ald-success-text);
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.ald-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 7px 14px;
	border-radius: var(--ald-radius-sm);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	position: relative;
}

.ald-btn .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 16px;
}

.ald-btn:focus-visible,
.ald-nav a:focus-visible,
.ald-input:focus-visible,
.ald-select:focus-visible,
.ald-preset-btn:focus-visible,
.ald-icon-btn:focus-visible,
.ald-pro-lock:focus-visible,
.ald-mini-btn:focus-visible,
.ald-modal-close:focus-visible {
	outline: 2px solid var(--ald-accent);
	outline-offset: 2px;
}

.ald-btn--primary {
	background: var(--ald-accent);
	color: #fff;
	box-shadow: var(--ald-shadow-xs);
}

.ald-btn--primary:hover,
.ald-btn--primary:focus {
	background: var(--ald-accent-hover);
	color: #fff;
}

.ald-btn--primary[disabled] {
	opacity: 0.7;
	cursor: wait;
}

.ald-btn--secondary {
	background: var(--ald-surface);
	color: var(--ald-text);
	border-color: var(--ald-border-strong);
}

.ald-btn--secondary:hover {
	background: var(--ald-surface-subtle);
	border-color: var(--ald-border-hover);
	color: var(--ald-text);
}

.ald-btn--ghost {
	background: transparent;
	color: var(--ald-pro-text);
	border-color: var(--ald-pro-border);
	background: var(--ald-pro-bg);
}

.ald-btn--ghost:hover {
	background: #fde68a;
	color: var(--ald-pro-text);
}

.ald-btn--block {
	width: 100%;
}

.am_spinner {
	display: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	animation: aldSpin 0.65s linear infinite;
}

.am_submit_button[disabled] .am_spinner {
	display: inline-block;
}

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

/* -------------------------------------------------------------------------- */
/* 2-Column App Shell                                                         */
/* -------------------------------------------------------------------------- */

.ald-shell {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 28px;
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.ald-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 116px;
}

.ald-nav {
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	box-shadow: var(--ald-shadow-xs);
}

.ald-nav li {
	margin: 0 0 2px;
}

.ald-nav li:last-child {
	margin-bottom: 0;
}

.ald-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--ald-radius-sm);
	color: var(--ald-text-secondary);
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ald-nav a:hover {
	background: var(--ald-surface-subtle);
	color: var(--ald-text);
}

.ald-nav li.active a {
	background: var(--ald-accent-soft);
	color: var(--ald-accent-hover);
}

.ald-nav a .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 18px;
	opacity: 0.85;
}

.ald-nav__label {
	flex: 1;
}

.ald-nav__count {
	font-size: 12px;
	font-weight: 700;
	min-width: 22px;
	height: 20px;
	padding: 0 6px;
	border-radius: var(--ald-radius-pill);
	background: #e5e7eb;
	color: #374151;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ald-nav li.active .ald-nav__count {
	background: var(--ald-accent);
	color: #fff;
}

/* Side Cards */
.ald-side-card {
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	padding: 16px;
	box-shadow: var(--ald-shadow-xs);
}

.ald-side-card--pro {
	border-color: var(--ald-pro-border);
	background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
}

.ald-side-card__eyebrow {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ald-pro-text);
	margin-bottom: 4px;
}

.ald-side-card h3 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--ald-text);
}

.ald-side-card p {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--ald-text-muted);
}

.ald-check-list {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: var(--ald-text-secondary);
}

.ald-check-list li {
	position: relative;
	padding-left: 20px;
	margin: 0;
}

.ald-check-list li::before {
	content: "\f12a";
	font-family: dashicons;
	position: absolute;
	left: 0;
	top: 1px;
	color: #15803d;
	font-size: 15px;
}

.ald-side-card__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ald-side-links {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ald-side-links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 8px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--ald-text-secondary);
	text-decoration: none;
}

.ald-side-links a:hover {
	background: var(--ald-surface-subtle);
	color: var(--ald-accent-hover);
}

.ald-side-links a .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}

/* -------------------------------------------------------------------------- */
/* Main Panels & Cards                                                        */
/* -------------------------------------------------------------------------- */

.ald-main .tf-tab-content {
	display: none;
}

.ald-main .tf-tab-content.active {
	display: block;
}

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

.ald-panel-head > div:first-child {
	flex: 1 1 320px;
	min-width: 0;
}

.ald-panel-actions {
	flex-shrink: 0;
}

.ald-panel-head h2 {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ald-text);
}

.ald-panel-desc {
	margin: 0;
	color: var(--ald-text-muted);
	font-size: 14px;
}

.ald-card {
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	padding: 20px;
	box-shadow: var(--ald-shadow-xs);
	margin-bottom: 18px;
}

.ald-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.ald-card h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--ald-text);
}

.ald-card p {
	margin: 0 0 14px;
	color: var(--ald-text-secondary);
}

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

.ald-kpi-card {
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	padding: 18px 20px;
	box-shadow: var(--ald-shadow-xs);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ald-kpi-card__label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ald-text-muted);
}

.ald-kpi-card__value {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ald-text);
}

.ald-kpi-card__sub {
	font-size: 12.5px;
	color: var(--ald-text-muted);
}

.ald-two-col {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.ald-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: var(--ald-radius-pill);
	font-size: 12px;
	font-weight: 600;
	background: #e5e7eb;
	color: #374151;
}

.ald-pill--accent {
	background: var(--ald-accent-soft);
	color: var(--ald-accent-hover);
}

/* Preset Bar & Recipes */
.ald-preset-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
	padding: 12px 14px;
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
}

.ald-preset-bar__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ald-text-muted);
	margin-right: 4px;
}

.ald-preset-btn {
	background: var(--ald-surface-subtle);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-pill);
	padding: 5px 12px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ald-text-secondary);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ald-preset-btn:hover {
	background: var(--ald-accent-soft);
	border-color: var(--ald-accent);
	color: var(--ald-accent-hover);
}

.ald-recipe-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.ald-recipe-chip {
	padding: 10px 12px;
	border-radius: var(--ald-radius-sm);
	background: var(--ald-surface-subtle);
	border: 1px solid var(--ald-divider);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ald-recipe-chip strong {
	font-size: 13px;
	color: var(--ald-text);
}

.ald-recipe-chip code {
	font-family: var(--ald-mono);
	font-size: 12px;
	background: transparent;
	padding: 0;
	color: var(--ald-accent-hover);
}

/* -------------------------------------------------------------------------- */
/* Collapsible Wrapper Cards                                                  */
/* -------------------------------------------------------------------------- */

.ald-wrappers-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ald-app .ald-wrapper-card.postbox {
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	box-shadow: var(--ald-shadow-xs);
	margin: 0;
	overflow: hidden;
	min-width: 0;
}

.ald-wrapper-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: var(--ald-surface-subtle);
	cursor: pointer;
	user-select: none;
}

.ald-wrapper-card.opened .ald-wrapper-card__head {
	border-bottom: 1px solid var(--ald-divider);
	background: #ffffff;
}

.ald-wrapper-card__title-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	flex-wrap: wrap;
}

.ald-wrapper-card__index {
	font-size: 12px;
	font-weight: 700;
	color: var(--ald-text-muted);
	background: #e5e7eb;
	padding: 2px 8px;
	border-radius: var(--ald-radius-pill);
	flex-shrink: 0;
}

.ald-app input.ald_ajax_wrap_title {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ald-text);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 4px 8px;
	min-width: 220px;
	max-width: 340px;
	width: 260px;
	box-shadow: none;
}

.ald-app input.ald_ajax_wrap_title:hover,
.ald-app input.ald_ajax_wrap_title:focus {
	background: #fff;
	border-color: var(--ald-border-strong);
}

.ald-wrapper-card__summary {
	font-family: var(--ald-mono);
	font-size: 12px;
	color: var(--ald-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 300px;
}

.ald-wrapper-card__controls {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.ald-icon-btn {
	width: 30px;
	height: 30px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--ald-text-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.ald-icon-btn--danger:hover {
	background: var(--ald-danger-bg);
	color: var(--ald-danger-text);
	border-color: var(--ald-danger-border);
}

.ald-chevron {
	color: var(--ald-text-muted);
	transition: transform 0.2s ease;
}

.ald-wrapper-card.opened .ald-chevron {
	transform: rotate(180deg);
}

.ald-wrapper-card__body {
	padding: 20px;
}

/* Form Grid */
.ald-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
}

.ald-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ald-field--full {
	grid-column: 1 / -1;
}

.ald-field__label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ald-field label,
.ald-field-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--ald-text);
}

.ald-input,
.ald-select {
	width: 100%;
	max-width: 100%;
	min-height: 38px;
	padding: 7px 11px;
	border: 1px solid var(--ald-border-strong);
	border-radius: var(--ald-radius-sm);
	background-color: var(--ald-surface);
	color: var(--ald-text);
	font-size: 13.5px;
	line-height: 1.4;
	box-shadow: none;
}

body.wp-core-ui .ald-app select.ald-select,
.ald-app select.ald-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 34px;
	background: var(--ald-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%234b5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
	background-size: 16px 16px;
}

.ald-input::placeholder {
	color: var(--ald-placeholder);
}

.ald-input:focus,
.ald-select:focus {
	border-color: var(--ald-accent);
	box-shadow: 0 0 0 3px var(--ald-accent-ring);
}

.ald-input[disabled],
.ald-select[disabled] {
	background: var(--ald-surface-subtle);
	color: var(--ald-text-muted);
	cursor: not-allowed;
}

.ald-app .desc {
	margin: 0;
	font-size: 12.5px;
	color: var(--ald-text-muted);
}

.ald-pro-lock {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 8px;
	border-radius: var(--ald-radius-pill);
	border: 1px solid var(--ald-pro-border);
	background: var(--ald-pro-bg);
	color: var(--ald-pro-text);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.ald-pro-lock .dashicons {
	width: 14px;
	height: 14px;
	font-size: 14px;
	line-height: 14px;
}

/* Data Implement Selectors Table */
.ald-dis-box {
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-sm);
	background: var(--ald-surface-subtle);
	padding: 12px;
}

.ald-dis-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
}

.ald-dis-table th {
	text-align: left;
	font-size: 12px;
	font-weight: 700;
	color: var(--ald-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0 6px 2px;
}

.ald-dis-table td {
	padding: 0 6px;
}

.ald-dis-actions-col {
	width: 84px;
}

.disr_action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ald-mini-btn {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid var(--ald-border-strong);
	background: var(--ald-surface);
	color: var(--ald-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.ald-mini-btn:hover {
	border-color: var(--ald-accent);
	color: var(--ald-accent);
}

.ald-mini-btn.disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Empty State */
.ald-empty-state {
	background: var(--ald-surface);
	border: 1px dashed var(--ald-border-strong);
	border-radius: var(--ald-radius-md);
	padding: 40px 24px;
	text-align: center;
}

.ald-empty-state .dashicons {
	width: 36px;
	height: 36px;
	font-size: 36px;
	color: var(--ald-text-muted);
	margin-bottom: 8px;
}

.ald-empty-state h3 {
	margin: 0 0 6px;
	font-size: 16px;
	color: var(--ald-text);
}

.ald-empty-state p {
	margin: 0 auto;
	max-width: 460px;
	color: var(--ald-text-muted);
	font-size: 13.5px;
}

/* Toggle Switch */
.ald-toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.ald-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex-shrink: 0;
}

.ald-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.ald-switch__slider {
	position: absolute;
	inset: 0;
	cursor: pointer;
	background: #787e88;
	border-radius: var(--ald-radius-pill);
	transition: background-color 0.2s ease;
}

.ald-switch__slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

.ald-switch input:checked + .ald-switch__slider {
	background: #19873d;
}

.ald-switch input:checked + .ald-switch__slider::before {
	transform: translateX(20px);
}

.ald-switch input:focus-visible + .ald-switch__slider {
	outline: 2px solid var(--ald-accent);
	outline-offset: 2px;
}

/* Code Editors & Locked Pro Box */
.ald-app .CodeMirror {
	border: 1px solid var(--ald-border-strong);
	border-radius: var(--ald-radius-sm);
	font-size: 13px;
	height: 200px;
}

.ald-code-textarea {
	width: 100%;
	font-family: var(--ald-mono);
	font-size: 13px;
	border: 1px solid var(--ald-border-strong);
	border-radius: var(--ald-radius-sm);
	padding: 10px 12px;
}

.ald-pro-overlay-box {
	position: relative;
	cursor: pointer;
	border-radius: var(--ald-radius-sm);
	overflow: hidden;
}

.ald-pro-overlay-box textarea {
	opacity: 0.45;
	pointer-events: none;
}

.ald-pro-overlay-cta {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: var(--ald-radius-pill);
	background: #111827;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	box-shadow: var(--ald-shadow-sm);
}

/* Pro License Tab Compatibility */
#license-menu h4 {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
	color: var(--ald-text);
}

#license-menu .tf-field-wrap {
	background: var(--ald-surface);
	border: 1px solid var(--ald-border);
	border-radius: var(--ald-radius-md);
	padding: 20px;
	box-shadow: var(--ald-shadow-xs);
}

/* -------------------------------------------------------------------------- */
/* Modal & Toasts                                                             */
/* -------------------------------------------------------------------------- */

.ald-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ald-modal-backdrop .am_shadow {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
}

.ald-modal-card {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 620px;
	max-height: 88vh;
	overflow: auto;
	background: var(--ald-surface);
	border-radius: var(--ald-radius-lg);
	box-shadow: var(--ald-shadow-modal);
}

.ald-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--ald-border);
	background: var(--ald-surface);
	color: var(--ald-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ald-modal-close:hover {
	background: var(--ald-surface-subtle);
}

.ald-modal-header {
	padding: 24px 28px 20px;
	text-align: center;
	background: var(--ald-surface-subtle);
	border-bottom: 1px solid var(--ald-divider);
}

.ald-modal-header h2 {
	margin: 10px 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--ald-text);
}

.ald-modal-header p {
	margin: 0 auto 16px;
	max-width: 460px;
	color: var(--ald-text-muted);
	font-size: 13.5px;
}

.ald-modal-body {
	padding: 20px 28px 26px;
}

.ald-compare-table {
	width: 100%;
	border-collapse: collapse;
}

.ald-compare-table th,
.ald-compare-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--ald-divider);
	text-align: left;
	font-size: 13.5px;
}

.ald-compare-table th:not(:first-child),
.ald-compare-table td:not(:first-child) {
	text-align: center;
	width: 110px;
}

.ald-compare-table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ald-text-muted);
}

.ald-compare-table .dashicons-yes-alt {
	color: #15803d;
}

.ald-compare-table .dashicons-no-alt {
	color: #9ca3af;
}

/* Toast Notifications */
.ald-toast-stack {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 360px;
}

.ald-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: var(--ald-radius-md);
	background: #111827;
	color: #fff;
	font-size: 13.5px;
	font-weight: 500;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
	animation: aldToastIn 0.2s ease;
}

.ald-toast--success {
	background: #14532d;
}

.ald-toast--error {
	background: #991b1b;
}

@keyframes aldToastIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.ald-shell {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.ald-sidebar {
		position: static;
	}

	.ald-nav {
		display: flex;
		flex-wrap: wrap;
		gap: 4px;
	}

	.ald-nav li {
		margin: 0;
	}
}

@media (max-width: 782px) {
	.ald-topbar {
		top: 46px;
		padding: 12px 16px;
	}

	.ald-kpi-grid,
	.ald-two-col,
	.ald-field-grid,
	.ald-recipe-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.am_spinner,
	.ald-toast {
		animation: none;
	}
	.ald-chevron,
	.ald-switch__slider,
	.ald-switch__slider::before {
		transition: none;
	}
}
