/* RedThunder Dashboard - Layout come reference */
:root {
	--es-bg: #f5f5f5;
	--es-sidebar-bg: #1a1a1a;
	--es-sidebar-text: #fff;
	--es-sidebar-hover: #2d2d2d;
	--es-sidebar-active: #c00;
	--es-card-bg: #fff;
	--es-card-border: #e8e8e8;
	--es-primary: #c00;
	--es-primary-hover: #a00;
	--es-success: #16a34a;
	--es-danger: #dc2626;
	--es-muted: #64748b;
	--es-radius: 8px;
	--es-shadow: 0 1px 3px rgba(0,0,0,.08);
	--es-shadow-lg: 0 4px 12px rgba(0,0,0,.1);
	/* Brand text: stesso gradiente della landing page */
	--es-brand-text-gradient: linear-gradient( 90deg, #9f0000 0%, #f00 22%, #f97316 48%, #fbbf24 72%, #fde047 100% );
}

/* font-family: Exo 2 caricato da email-studio-exo-2 (email-studio.php) */
.es-dashboard-body { margin: 0; background: var(--es-bg); color: #111; min-height: 100vh; font-family: "Exo 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
/* Layout standalone: login/registrati senza sidebar */
.es-dashboard-body.es-standalone { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 2rem; box-sizing: border-box; }
.es-standalone-wrap { width: 100%; max-width: 400px; }
.es-standalone-wrap .es-standalone-brand { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; font-weight: 700; font-size: 1.25rem; color: #111; text-decoration: none; }
.es-standalone-wrap .es-standalone-brand .es-brand-icon { width: 32px; height: 32px; background: var(--es-primary); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.es-brand-icon--img { background: transparent !important; }
.es-brand-icon--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.es-standalone-wrap .es-standalone-main { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 2rem; box-shadow: var(--es-shadow-lg); border: 1px solid var(--es-card-border); }
.es-dashboard { display: flex; min-height: 100vh; }
.es-dash-sidebar { width: 260px; flex-shrink: 0; background: var(--es-sidebar-bg); color: var(--es-sidebar-text); padding: 1.5rem 0; display: flex; flex-direction: column; }
.es-dash-sidebar .es-brand { display: flex; align-items: center; gap: 0.5rem; padding: 0 1.5rem 1.25rem; margin-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; color: inherit; font-weight: 700; font-size: 1.25rem; }
.es-dash-sidebar .es-brand-icon { width: 32px; height: 32px; background: var(--es-sidebar-active); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; }
.es-dash-sidebar .es-nav-list { list-style: none; padding: 0 0.75rem; margin: 0; flex: 1; }
.es-dash-sidebar .es-nav-list li { margin: 0; }
.es-dash-sidebar .es-nav-list a { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 1rem; color: inherit; text-decoration: none; font-size: 0.95rem; border-radius: 6px; transition: background .15s; }
.es-dash-sidebar .es-nav-list a:hover { background: var(--es-sidebar-hover); color: #fff; }
.es-dash-sidebar .es-nav-list a.es-nav-active { background: var(--es-sidebar-active); color: #fff; }
.es-dash-sidebar .es-nav-list a.es-nav-disabled {
	opacity: 0.5;
	filter: grayscale(100%);
	cursor: not-allowed;
	background: transparent;
}
.es-dash-sidebar .es-nav-list a.es-nav-disabled:hover { background: transparent; color: inherit; }
.es-dash-sidebar .es-nav-list .es-nav-icon { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: .92; }
.es-dash-sidebar .es-nav-label, .es-dash-sidebar .es-brand-text { white-space: nowrap; }
.es-dash-sidebar .es-brand-text {
	background: var(--es-brand-text-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
/* Tenant sotto agenzia: logo agenzia in header sidebar */
.es-dash-sidebar .es-brand-icon.es-brand-icon--agency {
	width: 40px;
	height: 40px;
	background: transparent;
	border-radius: 8px;
}
.es-dash-sidebar .es-brand-text.es-brand-text--agency {
	background: none;
	-webkit-background-clip: unset;
	background-clip: unset;
	color: #fff;
	-webkit-text-fill-color: #fff;
}
/* Standalone (login, ecc.): stesso brand agenzia se applicabile */
.es-standalone-wrap .es-standalone-brand .es-brand-icon.es-brand-icon--agency {
	width: 40px;
	height: 40px;
	background: transparent;
	border-radius: 8px;
}
.es-dash-sidebar .es-nav-footer-wrap { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.1); }
.es-dash-sidebar .es-btn-logout { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; background: var(--es-sidebar-active); color: #fff; border: none; border-radius: 50px; font-size: 0.9rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .2s; }
.es-dash-sidebar .es-btn-logout:hover { background: var(--es-primary-hover); color: #fff; }
.es-dash-sidebar .es-btn-logout .es-nav-icon { width: 18px; height: 18px; opacity: 1; }

.es-icon { width: 1em; height: 1em; display: block; }
.es-brand-icon .es-icon { width: 18px; height: 18px; }
.es-nav-icon .es-icon { width: 18px; height: 18px; }

.es-dash-main { flex: 1; padding: 2rem 2.5rem; max-width: 1280px; position: relative; }

/* Link in contenuto: nero + sottolineato (non bottoni / sidebar) */
.es-standalone-wrap .es-standalone-main a:not(.es-btn):not(.es-btn-primary):not(.es-btn-secondary):not(.es-btn-link),
.es-dash-main a:not(.es-btn):not(.es-btn-primary):not(.es-btn-secondary):not(.es-btn-link) {
	color: #111;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.es-standalone-wrap .es-standalone-main a:not(.es-btn):not(.es-btn-primary):not(.es-btn-secondary):not(.es-btn-link):hover,
.es-dash-main a:not(.es-btn):not(.es-btn-primary):not(.es-btn-secondary):not(.es-btn-link):hover {
	color: #111;
	text-decoration: underline;
}
.es-license-top-banner {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 1rem;
	background: #fff7ed;
	color: #9a3412;
	border-bottom: 1px solid #fdba74;
}
.es-license-top-banner .es-btn { white-space: nowrap; }
.es-license-top-banner .es-notice.es-unlock-explain {
	margin: 0;
	max-width: none;
	flex: 1;
	min-width: min(100%, 240px);
}
.es-sidebar-toggle { position: sticky; top: 0.75rem; z-index: 15; width: 36px; height: 36px; border-radius: 8px; border: 1px solid #dbe3ee; background: #fff; color: #334155; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--es-shadow); margin: 0 0 0.75rem; }
.es-sidebar-toggle:hover { background: #f8fafc; }
.es-sidebar-toggle .es-sidebar-toggle-icon { display: none; width: 18px; height: 18px; }
.es-dashboard-body:not(.es-sidebar-collapsed) .es-sidebar-toggle-icon-collapse { display: inline-flex; }
.es-dashboard-body.es-sidebar-collapsed .es-sidebar-toggle-icon-expand { display: inline-flex; }

/* Collapsed sidebar mode */
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar { width: 78px; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-brand { justify-content: center; padding: 0 0.25rem 1rem; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-brand-text { display: none; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-nav-list { padding: 0 0.4rem; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-nav-list a { justify-content: center; padding: 0.65rem 0.5rem; gap: 0; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-nav-label { display: none; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-nav-footer-wrap { padding: 1rem 0.5rem; text-align: center; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-btn-logout { padding: 0.55rem 0.6rem; border-radius: 10px; justify-content: center; }
.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar .es-btn-logout .es-nav-label { display: none; }

@media (max-width: 1024px) {
	.es-dashboard-body.es-sidebar-collapsed .es-dash-sidebar { width: 0; padding: 0; overflow: hidden; border-right: 0; }
	.es-dashboard-body.es-sidebar-collapsed .es-dash-main { padding-left: 1.25rem; }
}
.es-dash-header { margin-bottom: 1.75rem; }
.es-dash-header h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.25rem 0; color: #111; }
.es-dash-header .es-subtitle { color: var(--es-muted); font-size: 0.95rem; }

/* KPI cards - riga in alto */
.es-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
@media (max-width: 1200px) { .es-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .es-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .es-kpi-grid { grid-template-columns: 1fr; } }
.es-kpi-card { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 1.25rem; box-shadow: var(--es-shadow); border: 1px solid var(--es-card-border); }
.es-kpi-card .es-kpi-value { font-size: 1.75rem; font-weight: 700; color: #111; line-height: 1.2; }
.es-kpi-card .es-kpi-change { font-size: 0.8rem; margin-top: 0.35rem; }
.es-kpi-card .es-kpi-change.positive { color: var(--es-success); }
.es-kpi-card .es-kpi-change.negative { color: var(--es-danger); }
.es-kpi-card .es-kpi-label { font-size: 0.85rem; color: var(--es-muted); margin-top: 0.25rem; }
.es-kpi-card .es-kpi-compare { font-size: 0.78rem; margin-top: 0.35rem; line-height: 1.35; }
.es-kpi-card .es-kpi-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 0.5rem; }
.es-kpi-card .es-kpi-icon .es-icon { width: 20px; height: 20px; }
.es-kpi-card.es-kpi-sent .es-kpi-icon { background: rgba(204,0,0,.12); color: var(--es-primary); }
.es-kpi-card.es-kpi-open .es-kpi-icon { background: rgba(22,163,74,.12); color: var(--es-success); }
.es-kpi-card.es-kpi-click .es-kpi-icon { background: rgba(234,179,8,.2); color: #ca8a04; }
.es-kpi-card.es-kpi-contacts .es-kpi-icon { background: rgba(59,130,246,.15); color: #2563eb; }

/* Statistiche avanzate: card mese vs 12 mesi affiancate */
.es-kpi-grid--period-compare { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .es-kpi-grid--period-compare { grid-template-columns: 1fr; } }
.es-kpi-card--period-compare .es-kpi-card-head {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 1rem;
}
.es-kpi-card--period-compare .es-kpi-icon {
	margin-bottom: 0;
	flex-shrink: 0;
}
.es-kpi-card--period-compare .es-kpi-title {
	font-size: 0.95rem;
	font-weight: 600;
	color: #334155;
	line-height: 1.2;
}
.es-kpi-card--period-compare .es-kpi-compare-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}
.es-kpi-card--period-compare .es-kpi-compare-col {
	flex: 1 1 0;
	min-width: 0;
}
.es-kpi-card--period-compare .es-kpi-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: #111;
	line-height: 1.15;
	margin-top: 0;
}
.es-kpi-card--period-compare .es-kpi-period,
.es-kpi-card--period-compare .es-kpi-sub {
	font-size: 0.78rem;
	color: var(--es-muted);
	line-height: 1.35;
}
.es-kpi-card--period-compare .es-kpi-period { margin-top: 0.2rem; }
.es-kpi-card--period-compare .es-kpi-sub { margin-top: 0.1rem; }
.es-kpi-card--period-compare .es-kpi-compare-sep {
	flex: 0 0 auto;
	align-self: flex-start;
	padding-top: 0.35rem;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1;
	color: var(--es-success);
}

/* Due colonne: Performance + Trend */
.es-dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 900px) { .es-dash-two-col { grid-template-columns: 1fr; } }
.es-dash-card { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 1.5rem; box-shadow: var(--es-shadow); border: 1px solid var(--es-card-border); }
.es-dash-card h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.35rem 0; color: #111; }
.es-dash-card .es-card-subtitle { font-size: 0.85rem; color: var(--es-muted); margin-bottom: 1rem; }
.es-dash-card .es-perf-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.es-dash-card .es-perf-table th, .es-dash-card .es-perf-table td { padding: 0.5rem 0.25rem 0.5rem 0; text-align: left; border-bottom: 1px solid #f1f5f9; }
.es-dash-card .es-perf-table th { font-weight: 500; color: var(--es-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; }
.es-dash-card .es-perf-table td:first-child { font-weight: 500; }
.es-dash-card .es-perf-table .es-click-link-cell {
	max-width: 0;
	width: 75%;
}
.es-dash-card .es-perf-table .es-click-link-cell a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
}
.es-dash-card .es-perf-table .es-click-link-url {
	display: block;
	font-size: 0.75rem;
	margin-top: 0.15rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.es-dash-card .es-trend-bar { margin-bottom: 1rem; }
.es-dash-card .es-trend-bar:last-child { margin-bottom: 0; }
.es-dash-card .es-trend-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.35rem; }
.es-dash-card .es-trend-track { height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; }
.es-dash-card .es-trend-fill { height: 100%; border-radius: 5px; transition: width .3s; }
.es-dash-card .es-trend-fill.red { background: var(--es-primary); }
.es-dash-card .es-trend-fill.green { background: var(--es-success); }
.es-dash-card .es-trend-fill.yellow { background: #eab308; }
.es-deliverability-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.35rem; }
.es-deliverability-badge { display: inline-flex; align-items: center; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; }
.es-deliverability-badge.es-deliverability-healthy { background: #ecfdf5; color: #166534; border-color: #a7f3d0; }
.es-deliverability-badge.es-deliverability-warning { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.es-deliverability-badge.es-deliverability-risk { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.es-deliverability-alert { margin: 0.2rem 0 1rem; padding: 0.75rem 0.9rem; border-radius: 8px; border: 1px solid transparent; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.86rem; }
.es-deliverability-alert.es-deliverability-warning { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.es-deliverability-alert.es-deliverability-risk { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Warmup completato: messaggio centrato, verde tenue e non invasivo */
.es-warmup-complete-banner {
	display: block;
	max-width: 100%;
	box-sizing: border-box;
	text-align: center;
	padding: 1.15rem 1.25rem;
	border-radius: 12px;
	background: #ecfdf5;
	border: 1px solid #bbf7d0;
	color: #166534;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Prossimamente */
.es-dash-section-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.25rem 0; color: #111; }
.es-dash-section-subtitle { font-size: 0.9rem; color: var(--es-muted); margin-bottom: 1.25rem; }
.es-upcoming-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) { .es-upcoming-grid { grid-template-columns: 1fr; } }
.es-upcoming-card { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 1.25rem; box-shadow: var(--es-shadow); border: 1px solid var(--es-card-border); }
.es-upcoming-card .es-upcoming-icon { width: 40px; height: 40px; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 0.75rem; }
.es-upcoming-card .es-upcoming-icon .es-icon { width: 21px; height: 21px; color: #334155; }
.es-upcoming-card h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.35rem 0; }
.es-upcoming-card p { font-size: 0.85rem; color: var(--es-muted); margin: 0; }

/* Stats cards (altre pagine) */
.es-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.es-stat-card { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 1.25rem; box-shadow: var(--es-shadow); border: 1px solid var(--es-card-border); }
.es-stat-card .es-stat-value { font-size: 1.75rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.es-stat-card .es-stat-label { font-size: 0.8rem; color: var(--es-muted); margin-top: 0.25rem; }
.es-stat-card.es-stat-sent .es-stat-value { color: var(--es-primary); }
.es-stat-card.es-stat-open .es-stat-value { color: var(--es-success); }
.es-stat-card.es-stat-click .es-stat-value { color: #7c3aed; }
.es-stat-card .es-stat-note { font-size: 0.7rem; color: #94a3b8; margin-top: 0.5rem; }

/* Limit bar */
/* Home: banner attivazione licenza (sostituisce barra invii finché licenza non valida) */
.es-home-license-banner {
	margin: 0 0 1.5rem;
	padding: 1.25rem 1.35rem 1.35rem;
	border-radius: 12px;
	background: linear-gradient(135deg, #9f0000 0%, #dc2626 32%, #ea580c 62%, #f97316 88%, #fb923c 100%);
	color: #fff;
	box-shadow: 0 4px 20px rgba(185, 28, 28, 0.35);
}
.es-home-license-banner__title {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* Piano Free senza licenza a pagamento: prima voce menu laterale */
.es-dash-sidebar .es-nav-list a.es-nav-purchase {
	margin-bottom: 0.5rem;
	font-weight: 600;
	background: linear-gradient(135deg, #b91c1c 0%, #dc2626 38%, #ea580c 72%, #facc15 100%);
	color: #fff !important;
	box-shadow: 0 2px 10px rgba(185, 28, 28, 0.35);
}
.es-dash-sidebar .es-nav-list a.es-nav-purchase:hover {
	background: linear-gradient(135deg, #c41e1e 0%, #e62e2e 38%, #f56e0c 72%, #fdda20 100%);
	color: #fff !important;
}
.es-home-license-banner__form {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.65rem;
}
.es-home-license-banner__input {
	flex: 1 1 200px;
	min-width: 0;
	padding: 0.65rem 0.85rem;
	border: 2px solid rgba(255, 255, 255, 0.55);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	color: #0f172a;
	font-size: 0.95rem;
}
.es-home-license-banner__input:focus {
	outline: none;
	border-color: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.es-home-license-banner__submit {
	flex: 0 0 auto;
	padding: 0.65rem 1.25rem;
	border: none;
	border-radius: 8px;
	background: #fff;
	color: #b91c1c;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.es-home-license-banner__submit:hover {
	background: #fef2f2;
}
.es-home-license-banner__msg {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
}
.es-home-license-banner__msg--ok {
	color: #fef9c3;
}
.es-home-license-banner__msg--err {
	color: #fff;
	background: rgba(0, 0, 0, 0.2);
	padding: 0.45rem 0.65rem;
	border-radius: 6px;
}
.es-limit-bar-wrap { margin: 1rem 0 1.5rem; }
.es-limit-bar-wrap .es-limit-label { font-size: 0.95rem; font-weight: 600; color: var(--es-muted); margin-bottom: 0.35rem; }
.es-limit-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.es-limit-bar-fill { height: 100%; background: linear-gradient(90deg, var(--es-primary), #e00); border-radius: 4px; transition: width .3s; }
.es-limit-bar-fill.es-limit-full { background: var(--es-danger); }

/* Nav cards (menu rapido in altre pagine) */
.es-nav-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.es-nav-cards a { display: flex; align-items: center; gap: 0.5rem; padding: 1rem; background: var(--es-card-bg); border-radius: var(--es-radius); border: 1px solid var(--es-card-border); text-decoration: none; color: #1e293b; font-weight: 500; font-size: 0.9rem; box-shadow: var(--es-shadow); transition: box-shadow .2s, border-color .2s; }
.es-nav-cards a:hover { border-color: var(--es-primary); box-shadow: var(--es-shadow-lg); color: var(--es-primary); }
.es-nav-cards .es-nav-icon { width: 2rem; height: 2rem; border-radius: 6px; background: var(--es-bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

/* Content sections */
.es-dash-main h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 1rem 0; }
.es-dash-main h3 { font-size: 1rem; font-weight: 600; margin: 0.5rem 0 0.75rem 0; }
.es-section { background: var(--es-card-bg); border-radius: var(--es-radius); padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: var(--es-shadow); border: 1px solid var(--es-card-border); }

/* Anteprima modello (pagina templates/?preview_template=): iframe ad altezza contenuto via JS → niente scroll dentro il riquadro bianco */
.es-template-preview-page .es-newsletter-preview-wrap {
	overflow: visible;
	max-width: 100%;
	box-sizing: border-box;
}

/* Buttons: inherit font così <button> non usa il font di sistema del browser (spesso diverso da <a class="es-btn">) */
.es-btn { display: inline-block; padding: 0.5rem 1rem; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; text-decoration: none; font-family: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.25; transition: background .15s, border-color .15s; box-sizing: border-box; }
button.es-btn { -webkit-appearance: none; appearance: none; }

/* Input/select dashboard: stesso font del body (evita “system UI” su select) */
.es-dashboard-body input.es-input,
.es-dashboard-body select.es-input,
.es-dashboard-body textarea.es-input { font-family: inherit; font-size: 0.875rem; line-height: 1.25; box-sizing: border-box; }

/* Toolbar quarantena: una sola riga a sinistra (niente flex-grow sul form filtri → export non finisce a destra) */
/* Una sola riga: i <form> usano display:contents così input/pulsanti partecipano allo stesso flex (evita width:100% del .es-form sul select) */
.es-quarantine-toolbar {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0.75rem 0 1rem;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.es-quarantine-toolbar-filters,
.es-quarantine-toolbar-export,
.es-quarantine-toolbar-cleanup {
	display: contents;
}
.es-quarantine-toolbar .es-quarantine-toolbar-input,
.es-quarantine-toolbar .es-quarantine-toolbar-select {
	width: auto;
	min-width: 0;
	margin-bottom: 0;
	flex: 0 0 auto;
}
.es-quarantine-toolbar input.es-input,
.es-quarantine-toolbar select.es-input {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	background: #fff;
}
.es-quarantine-toolbar-input { max-width: min(320px, 42vw); min-height: 2.5rem; }
.es-quarantine-toolbar-select { max-width: min(180px, 32vw); min-height: 2.5rem; }
.es-quarantine-toolbar .es-btn,
.es-quarantine-toolbar .es-quarantine-toolbar-reset {
	flex: 0 0 auto;
	white-space: nowrap;
}
.es-quarantine-toolbar-reset { display: inline-flex; align-items: center; }
.es-quarantine-toolbar-cleanup-btn { max-width: none; }

.es-quarantine-correct-email input.es-input {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
	box-sizing: border-box;
}

/* Automazioni: monitoraggio coda per step */
.es-automation-stats-panel {
	background: var(--es-card-bg);
	border: 1px solid var(--es-card-border);
	border-radius: var(--es-radius);
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
	box-shadow: var(--es-shadow);
}
.es-automation-stats-panel-title {
	font-weight: 600;
	font-size: 1rem;
	margin: 0 0 0.35rem;
	color: #111;
}
.es-automation-stats-hint {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
}
.es-automation-stats-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.75rem;
}
.es-automation-stats-list li {
	margin: 0;
	font-size: 0.9rem;
}
.es-automation-stats-label {
	color: var(--es-muted);
	margin-right: 0.35rem;
}
.es-automation-stats-orphan[hidden] {
	display: none !important;
}
.es-automation-step-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.5rem;
}
.es-automation-step-head .es-automation-step-title {
	flex: 1 1 auto;
	min-width: 0;
}
.es-automation-step-queue-meta {
	margin-left: auto;
	font-size: 0.8rem;
	color: var(--es-muted);
	white-space: nowrap;
}
.es-automation-step-queue-count {
	font-weight: 600;
	color: #334155;
}

.es-btn-primary { background: var(--es-primary); color: #fff; border-color: var(--es-primary); }
.es-btn-secondary { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.es-btn:hover { background: #e2e8f0; }
.es-btn-primary:hover { background: var(--es-primary-hover); color: #fff; border-color: var(--es-primary-hover); }
.es-btn-secondary:hover { background: #e2e8f0; }
.es-btn:disabled, .es-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.es-btn-primary:disabled, .es-btn-primary[disabled] { opacity: 0.55; }
/* Dopo .es-btn / :hover: altrimenti il grigio sovrascrive il gradiente */
.es-btn.es-btn-redthunder {
	background: linear-gradient(135deg, #b91c1c 0%, #dc2626 38%, #ea580c 72%, #facc15 100%) !important;
	color: #fff !important;
	border: none !important;
	font-weight: 600;
	box-shadow: 0 2px 12px rgba(185, 28, 28, 0.38);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}
.es-btn.es-btn-redthunder:hover {
	background: linear-gradient(135deg, #c41e1e 0%, #e62e2e 38%, #f56e0c 72%, #fdda20 100%) !important;
	color: #fff !important;
	border: none !important;
	box-shadow: 0 4px 16px rgba(185, 28, 28, 0.48);
}
.es-license-top-banner .es-btn.es-btn-redthunder {
	flex-shrink: 0;
	align-self: center;
}
/* Interruttore attiva/disattiva (stile iOS, on = rosso brand) */
.es-toggle-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	cursor: pointer;
	user-select: none;
	vertical-align: middle;
}
.es-toggle-switch--row {
	width: 100%;
	justify-content: space-between;
	gap: 1rem;
}
.es-toggle-switch--compact { gap: 0; }
.es-toggle-switch-text {
	font-size: 0.9rem;
	font-weight: 500;
	color: #0f172a;
}
.es-toggle-switch-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.es-toggle-switch-track {
	position: relative;
	display: inline-block;
	width: 2.75rem;
	height: 1.5rem;
	border-radius: 999px;
	background: #cbd5e1;
	transition: background 0.2s ease;
	flex-shrink: 0;
}
.es-toggle-switch-knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}
.es-toggle-switch-input:checked + .es-toggle-switch-track {
	background: var(--es-primary);
}
.es-toggle-switch-input:checked + .es-toggle-switch-track .es-toggle-switch-knob {
	transform: translateX(1.25rem);
}
.es-toggle-switch-input:focus-visible + .es-toggle-switch-track {
	box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.28);
}
.es-toggle-switch-input:disabled + .es-toggle-switch-track {
	opacity: 0.45;
	cursor: not-allowed;
}
.es-table td.es-col-automation-active { vertical-align: middle; }
.es-btn-link { background: none; border: none; padding: 0; cursor: pointer; font-size: inherit; font-family: inherit; line-height: inherit; text-decoration: underline; color: var(--es-primary); }
.es-btn-link:hover { color: var(--es-primary-hover); }
.es-delete { color: var(--es-danger) !important; }
.es-delete:hover { color: #b91c1c !important; }
.es-contact-quarantine-label {
	color: #dc2626 !important;
	font-weight: 700;
	font-size: 0.875rem;
	white-space: nowrap;
	cursor: help;
	border-bottom: 1px dotted rgba(220, 38, 38, 0.45);
}
.es-contact-quarantine-banner {
	margin: 0 0 1.35rem;
	padding: 1rem 1rem 1rem 0.9rem;
	border-left: 4px solid #dc2626;
	background: #fef2f2;
	border-radius: var(--es-radius);
	color: #450a0a;
	cursor: help;
	box-shadow: var(--es-shadow);
}
.es-contact-quarantine-banner__title {
	display: block;
	font-size: 1.1rem;
	margin: 0 0 0.4rem;
	color: #b91c1c;
	font-weight: 700;
	text-transform: lowercase;
}
.es-contact-quarantine-banner__lead {
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: #7f1d1d;
}
.es-contact-quarantine-banner__reasons {
	margin: 0 0 0.5rem 1.1rem;
	padding: 0;
	font-size: 0.9rem;
	color: #7f1d1d;
}
.es-contact-quarantine-banner__reasons li { margin-bottom: 0.35rem; }
.es-contact-quarantine-reason {
	font-weight: 600;
	color: #b91c1c;
	cursor: help;
	border-bottom: 1px dotted rgba(185, 28, 28, 0.4);
}
.es-contact-quarantine-banner__hint { margin: 0.5rem 0 0.65rem; font-size: 0.82rem; max-width: 42rem; }
.es-contact-quarantine-banner .es-btn { cursor: pointer; }

/* Tables */
.es-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.es-table th, .es-table td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 1px solid var(--es-card-border); }
.es-table th { font-weight: 600; color: var(--es-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; }
.es-table tbody tr:hover { background: #f8fafc; }
.es-col-check { width: 2.5rem; text-align: center; }

/* Scrollable wide tables (DNS verification etc.) */
.es-table-scroll {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--es-card-border);
	border-radius: 10px;
	background: #fff;
}
.es-table-scroll .es-table { margin: 0; border-collapse: collapse; min-width: 880px; }
.es-table-scroll .es-table th,
.es-table-scroll .es-table td { border-bottom: 1px solid var(--es-card-border); }

/* DNS tables: allow long values to wrap inside code blocks */
.es-dns-table code {
	white-space: normal;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.es-dns-table td { vertical-align: top; }
.es-dns-table td .es-btn { white-space: nowrap; }

/* Forms */
.es-form label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.875rem; }
.es-form input[type="text"], .es-form input[type="email"], .es-form input[type="number"], .es-form input[type="password"], .es-form textarea { width: 100%; max-width: 500px; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem; box-sizing: border-box; }
.es-form select:not(.es-eb-rich-toolbar-select) { width: 100%; max-width: 500px; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem; box-sizing: border-box; }
.es-form input:focus, .es-form select:focus, .es-form textarea:focus { outline: none; border-color: var(--es-primary); box-shadow: 0 0 0 3px rgba(204,0,0,.15); }

/* Password show/hide toggle (login + registrazione) */
.es-password-field {
	position: relative;
	display: block;
	width: 100%;
	max-width: 500px;
}
.es-password-field input[type="password"],
.es-password-field input[type="text"] {
	max-width: 100%;
	padding-right: 2.6rem;
}
.es-pw-toggle {
	position: absolute;
	top: 50%;
	right: 0.45rem;
	transform: translateY(-50%);
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--es-muted);
	cursor: pointer;
	padding: 0;
}
.es-pw-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
	color: #111;
}
.es-pw-toggle:focus {
	outline: none;
	border-color: var(--es-primary);
	box-shadow: 0 0 0 3px rgba(204,0,0,.15);
}
.es-pw-toggle .es-icon {
	width: 18px;
	height: 18px;
}
.es-pw-toggle[aria-pressed="true"] {
	color: var(--es-primary);
}
/* Login: reset password + conferma email (accordion) */
.es-login-reset-details,
.es-login-resend-details { margin-top: 1.25rem; max-width: 420px; }
.es-login-reset-summary,
.es-login-resend-summary { cursor: pointer; font-size: 0.9rem; color: var(--es-primary); font-weight: 500; list-style: none; }
.es-login-reset-summary::-webkit-details-marker,
.es-login-resend-summary::-webkit-details-marker { display: none; }
.es-login-reset-hint { margin: 0.65rem 0 0.5rem; font-size: 0.82rem; line-height: 1.45; }
.es-form-reset-password { margin-top: 0.5rem; }
/* Agenzia → Clienti: una tendina per tenant (chiusa di default) */
.es-agency-client-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0.5rem 0 1.5rem;
}
.es-agency-client-details.es-agency-clients-details {
	margin: 0;
}
.es-agency-clients-details {
	border: 1px solid var(--es-card-border);
	border-radius: var(--es-radius);
	background: var(--es-card-bg);
	box-shadow: var(--es-shadow);
	overflow: hidden;
}
.es-agency-clients-summary {
	cursor: pointer;
	list-style: none;
	padding: 0.85rem 1rem;
	font-weight: 600;
	font-size: 1.05rem;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	user-select: none;
}
.es-agency-client-summary-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.65rem;
}
.es-agency-client-summary-email {
	font-weight: 400;
	font-size: 0.9rem;
}
.es-agency-summary-accedi {
	flex-shrink: 0;
	margin-left: auto;
	font-size: 0.9rem;
	padding: 0.4rem 0.75rem;
}
.es-agency-clients-summary::-webkit-details-marker { display: none; }
.es-agency-clients-summary::after {
	content: '';
	flex-shrink: 0;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid #64748b;
	border-bottom: 2px solid #64748b;
	transform: rotate(45deg);
	margin-top: -0.2rem;
	opacity: 0.85;
	transition: transform 0.15s ease;
}
.es-agency-clients-details[open] .es-agency-clients-summary::after {
	transform: rotate(-135deg);
	margin-top: 0.15rem;
}
.es-agency-clients-details[open] .es-agency-clients-summary {
	border-bottom: 1px solid var(--es-card-border);
}
.es-agency-clients-details-body {
	padding: 0 1rem 1rem;
	margin: 0;
}
.es-agency-clients-details-body.es-agency-client-list {
	padding-top: 0.25rem;
}
.es-input-full { max-width: 100% !important; }
.es-list-picker { width: 100%; max-width: 420px; margin-bottom: 0.65rem; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.es-list-picker[open] { box-shadow: 0 0 0 3px rgba(204,0,0,.12); border-color: var(--es-primary); }
.es-list-picker-summary { list-style: none; cursor: pointer; padding: 0.55rem 0.75rem; font-size: 0.9rem; font-weight: 500; color: #0f172a; user-select: none; }
.es-list-picker-summary::-webkit-details-marker { display: none; }
.es-list-picker-summary::after { content: '▾'; float: right; color: #64748b; }
.es-list-picker[open] .es-list-picker-summary::after { content: '▴'; }
.es-list-picker-panel { max-height: 210px; overflow: auto; border-top: 1px solid #e2e8f0; padding: 0.4rem 0.6rem; background: #f8fafc; }
.es-list-picker-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin: 0.2rem 0; }
.es-list-picker-item input[type="checkbox"] { margin: 0; }
.es-inline-form input[type="text"] { max-width: 200px; display: inline-block; margin-right: 0.5rem; }
.es-inline { display: inline; }
.es-inline form { display: inline; }
.es-form-inline-form input { display: inline-block; margin-right: 0.5rem; margin-bottom: 0.5rem; max-width: 180px; }
.es-form-inline-form input[type="email"] { min-width: 160px; }
.es-form-add-contact { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--es-card-border); }

/* Notices */
.es-notice { padding: 0.75rem 1rem; margin: 0.75rem 0; border-radius: 6px; font-size: 0.9rem; }
.es-notice.es-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
/* Feedback copia link clienti (whitelabel agenzia) */
.es-btn-copy-client-login--done {
	box-shadow: 0 0 0 2px var(--es-success, #16a34a);
	background: #f0fdf4 !important;
	transition: box-shadow 0.15s ease, background 0.15s ease;
}
.es-notice.es-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.es-notice.es-unlock-explain { background: #fffbeb; color: #78350f; border: 1px solid #fde68a; padding: 1rem 1.1rem; margin: 0 0 0.75rem; font-size: 0.95rem; max-width: 52rem; }
.es-notice.es-upgrade-hint { background: transparent; color: #991b1b; border: 1px solid #fecaca; }
.es-muted { color: var(--es-muted); font-size: 0.85rem; }
.es-quota-alert { margin: 0.75rem 0 1.1rem; padding: 0.85rem 1rem; border-radius: 8px; border: 1px solid #fecaca; background: #fef2f2; color: #7f1d1d; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.95rem; }
.es-quota-alert strong { font-size: 1rem; }

.es-nav { margin-top: 1.5rem; font-size: 0.9rem; }
.es-nav a { color: var(--es-primary); text-decoration: none; }
.es-nav a:hover { text-decoration: underline; }
.es-actions { white-space: nowrap; }
.es-actions a, .es-actions .es-btn-link { margin-right: 0.35rem; }
.es-table-models .es-actions { white-space: normal; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.es-table-models .es-actions a, .es-table-models .es-actions .es-btn-link { margin-right: 0; }

@media (min-width: 1024px) {
	.es-automation-preview-row {
		text-align: right;
	}
}
.es-automation-editor-form {
	max-width: 980px;
}
.es-automation-editor-form > p {
	margin-bottom: 1rem;
}
.es-automation-step-card {
	background: #f8fafc;
	border: 1px solid #dbe3ee !important;
	border-radius: 10px !important;
	padding: 0.85rem 0.95rem !important;
	margin: 0.65rem 0 !important;
}
.es-automation-step-card-main {
	background: #fff7ed;
	border-color: #fdba74 !important;
	margin-top: 0.5rem !important;
}
#es-automation-extra-steps .es-automation-step-row:nth-of-type(odd) {
	background: #eef2ff;
	border-color: #c7d2fe !important;
}
#es-automation-extra-steps .es-automation-step-row:nth-of-type(odd) .es-automation-step-badge {
	background: #c7d2fe;
	color: #3730a3;
}
#es-automation-extra-steps .es-automation-step-row:nth-of-type(even) {
	background: #fff7ed;
	border-color: #fdba74 !important;
}
#es-automation-extra-steps .es-automation-step-row:nth-of-type(even) .es-automation-step-badge {
	background: #fed7aa;
	color: #9a3412;
}
.es-automation-step-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.55rem;
}
.es-automation-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	background: #e2e8f0;
	color: #334155;
	font-size: 0.75rem;
	font-weight: 700;
}
.es-automation-step-card-main .es-automation-step-badge {
	background: #fed7aa;
	color: #9a3412;
}
.es-automation-step-head strong {
	font-size: 0.87rem;
	color: #0f172a;
}
.es-automation-step-card .es-step-send-fields,
.es-automation-step-card .es-step-list-fields,
.es-automation-step-card .es-step-tag-fields {
	margin: 0.35rem 0;
}
.es-automation-step-card .es-step-send-fields input[type="text"] {
	min-width: 220px;
}
.es-automation-step-card .es-step-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.55rem;
}
.es-automation-step-card .es-step-actions .es-btn {
	margin-top: 0;
}
.es-automation-trigger-card {
	background: #f8fafc;
	border: 1px solid #dbe3ee;
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
	margin: 0.7rem 0 1rem;
}
.es-automation-trigger-card > p:last-child {
	margin-bottom: 0;
}
.es-automation-trigger-card .es-muted {
	display: block;
	margin-top: 0.25rem;
}
.es-automation-trigger-card select[name="trigger_link_match"] {
	margin-left: 0;
}
.es-tag-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	background: hsl(var(--es-tag-h, 220), 72%, 88%);
	color: hsl(var(--es-tag-h, 220), 48%, 22%);
	border: 1px solid hsl(var(--es-tag-h, 220), 52%, 72%);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
}
.es-contact-tags.es-list-with-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	align-items: center;
}
.es-contact-tags.es-list-with-actions li {
	margin-bottom: 0;
}
.es-tag-pick-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.65rem;
	align-items: center;
}
.es-tag-pick-label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
}
.es-tag-rename-form {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
	min-height: 1.75rem;
}
.es-tag-rename-view {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex-wrap: wrap;
}
.es-tag-rename-view[hidden] {
	display: none !important;
}
/* display:inline-flex su .es-tag-rename-editor vince sull'attributo HTML hidden: serve [hidden] esplicito */
.es-tag-rename-editor[hidden] {
	display: none !important;
}
.es-tag-rename-editor:not([hidden]) {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}
.es-tag-rename-input {
	width: 10rem;
	max-width: min(14rem, 55vw);
	min-width: 0;
	margin: 0 !important;
	padding: 0.28rem 0.45rem;
	font-size: 0.9rem;
}
.es-btn-compact {
	padding: 0.28rem 0.55rem;
	font-size: 0.85rem;
}
@media (max-width: 820px) {
	.es-automation-step-card .es-step-send-fields input[type="text"] {
		min-width: 0;
	}
	.es-tag-rename-input {
		width: min(12rem, 70vw);
		max-width: 100%;
	}
}
#es-automation-extra-steps {
	margin-top: 1.35rem !important;
	padding-top: 0.4rem;
	border-top: 1px dashed #dbe3ee;
}
#es-automation-extra-steps > h3 {
	margin-top: 0 !important;
}
#es-automation-extra-steps .es-btn {
	margin-top: 0.3rem;
}
.es-import-errors { margin: 0.5rem 0; padding-left: 1.5rem; font-size: 0.85rem; }
.es-detail-list { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; max-width: 400px; }
.es-detail-list dt { font-weight: 600; font-size: 0.9rem; }
.es-form-inline p { display: inline-block; margin-right: 1rem; margin-bottom: 0.5rem; }
.es-form-inline p label { display: block; }
.es-list-with-actions { list-style: none; padding: 0; }
.es-list-with-actions li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.es-list-with-actions li a { flex: 0 1 auto; }
.es-list-with-actions li form { margin: 0; }

.es-kpi-chart-wrap { position: relative; width: 100%; min-height: 280px; margin: 0.5rem 0 1rem; }
.es-adv-lazy-msg { margin: 0.35rem 0 0.75rem; }
.es-chart-kpi-legend { margin-top: 0.25rem; padding: 0.85rem 1rem; background: #f8fafc; border: 1px solid var(--es-card-border); border-radius: var(--es-radius); font-size: 0.875rem; line-height: 1.5; }
.es-chart-kpi-legend-intro { margin: 0 0 0.5rem; font-weight: 600; color: #334155; }
.es-chart-kpi-legend-list { margin: 0; padding-left: 1.15rem; color: #475569; }
.es-chart-kpi-legend-list li { margin-bottom: 0.4rem; }
.es-chart-kpi-legend-list li:last-child { margin-bottom: 0; }
.es-chart-kpi-legend-note { margin: 0.75rem 0 0; font-size: 0.82rem; line-height: 1.45; }

.es-chart-bar-wrap { margin: 1rem 0; }
.es-chart-bar { display: flex; align-items: flex-end; gap: 4px; height: 80px; }
.es-chart-bar-item { flex: 1; min-width: 24px; background: linear-gradient(180deg, var(--es-primary), #f87171); border-radius: 4px 4px 0 0; transition: height .3s; }
.es-chart-bar-item:hover { opacity: .9; }
.es-chart-labels { display: flex; gap: 4px; margin-top: 0.35rem; font-size: 0.7rem; color: var(--es-muted); }
.es-chart-labels span { flex: 1; min-width: 24px; text-align: center; }

/* Dialog (confirm / alert / prompt) - RedThunder style */
.es-dialog { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }
.es-dialog[aria-hidden="false"] { display: flex; }
.es-dialog-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.es-dialog-box { position: relative; background: var(--es-card-bg); border-radius: var(--es-radius); box-shadow: 0 20px 40px rgba(0,0,0,.2); border: 1px solid var(--es-card-border); min-width: 320px; max-width: 440px; overflow: hidden; }
.es-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; background: #83d18f; color: #0f2e14; }
.es-dialog-box.es-dialog-success .es-dialog-header { background: #83d18f; color: #0f2e14; border-bottom: 1px solid #4ea85d; }
.es-dialog-box.es-dialog-warning .es-dialog-header { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d; }
.es-dialog-box.es-dialog-error .es-dialog-header { background: #fecaca; color: #7f1d1d; border-bottom: 1px solid #f87171; }
.es-dialog-box.es-dialog-success .es-dialog-message { color: #14532d; }
.es-dialog-box.es-dialog-warning .es-dialog-message { color: #7c2d12; }
.es-dialog-box.es-dialog-error .es-dialog-message { color: #7f1d1d; }
.es-dialog-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.es-dialog-close { background: none; border: none; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .25rem; opacity: .85; transition: opacity .15s; }
.es-dialog-close:hover { opacity: 1; }
.es-dialog-body { padding: 1.25rem 1.25rem 0; }
.es-dialog-message { margin: 0; font-size: 0.95rem; line-height: 1.5; color: #334155; }
.es-dialog-prompt-wrap { margin-top: 0.5rem; }
.es-dialog-prompt-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: #334155; }
.es-dialog-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.95rem; box-sizing: border-box; }
.es-dialog-input:focus { outline: none; border-color: var(--es-primary); box-shadow: 0 0 0 3px rgba(204,0,0,.15); }
.es-dialog-actions { display: flex; gap: 0.75rem; justify-content: flex-end; padding: 1.25rem 1.25rem 1.25rem; border-top: 1px solid var(--es-card-border); background: #fafafa; }
.es-dialog-btn { min-width: 5rem; }

/* Modale “Aggiungi a liste” (contatti bulk): elenco verticale scrollabile */
.es-bulk-lists-modal-box {
	max-width: min(420px, 100vw - 2rem);
	width: 100%;
}
.es-bulk-lists-modal-box .es-dialog-header {
	background: #f1f5f9;
	color: #0f172a;
	border-bottom: 1px solid var(--es-card-border);
}
.es-bulk-lists-modal-body {
	padding-bottom: 0.5rem;
}
.es-bulk-lists-modal-intro {
	margin: 0 0 0.65rem;
	font-size: 0.875rem;
	line-height: 1.45;
}
.es-bulk-lists-modal-filter-wrap {
	margin: 0 0 0.65rem;
}
.es-bulk-lists-check-scroll {
	max-height: min(50vh, 320px);
	overflow-y: auto;
	border: 1px solid var(--es-card-border);
	border-radius: 8px;
	padding: 0.35rem 0;
	background: #fafafa;
}
.es-bulk-list-check-row {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.4rem 0.75rem;
	cursor: pointer;
	font-size: 0.875rem;
	color: #334155;
	line-height: 1.35;
}
.es-bulk-list-check-row:hover {
	background: #f1f5f9;
}
.es-bulk-list-check-row input.es-bulk-list-cb {
	margin: 0.15rem 0 0;
	flex-shrink: 0;
}
.es-bulk-list-check-label {
	flex: 1;
	min-width: 0;
	word-break: break-word;
}
.es-bulk-add-to-lists {
	flex: 0 0 auto;
}

/* Tenant domain verification */
.es-domain-status-card { background: #f8fafc; border: 1px solid var(--es-card-border); border-radius: 8px; padding: 0.85rem 1rem; max-width: 620px; }
.es-domain-status-card p { margin: 0.3rem 0; }
.es-domain-status-neutral { color: #334155; font-weight: 600; }
.es-domain-status-pending { color: #9a3412; font-weight: 600; }
.es-domain-status-ok { color: #065f46; font-weight: 700; }
.es-domain-status-error { color: #991b1b; font-weight: 700; }
.es-dns-table .es-btn-copy-dns { min-width: 76px; }
.es-btn-copy-dns {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 76px;
	min-height: 2rem;
	padding: 0.35rem 0.65rem;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.es-btn-copy-dns-label { line-height: 1.2; }
.es-btn-copy-dns-check {
	display: none;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
}
.es-btn-copy-dns.es-copied {
	background-color: #059669 !important;
	border-color: #047857 !important;
	color: #fff !important;
	box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.35);
}
.es-btn-copy-dns.es-copied .es-btn-copy-dns-label { display: none; }
.es-btn-copy-dns.es-copied .es-btn-copy-dns-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.es-dns-copy-feedback.es-dns-copy-feedback--ok {
	color: #047857;
	font-weight: 600;
}
.es-dns-priority { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.es-dns-priority-required { background: #fee2e2; color: #991b1b; }
.es-dns-priority-recommended { background: #fef3c7; color: #92400e; }
.es-dns-caption { margin: 0 0 0.5rem; font-size: 0.9rem; }
.es-callout.es-dns-hosting-panel { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 0.85rem 1rem 1rem; max-width: 100%; }
.es-dns-table-hosting { margin-top: 0.5rem; }

/* Verifica dominio: accordion step + CTA controllo */
.es-domain-verifica-steps { display: flex; flex-direction: column; gap: 0.35rem; }
.es-step-toggle { border: 1px solid var(--es-card-border, #e2e8f0); border-radius: 8px; background: #fff; padding: 0 0.85rem; margin-bottom: 0.25rem; }
.es-step-toggle[open] { padding-bottom: 0.65rem; }
.es-step-toggle-summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem 0; font-weight: 600; font-size: 1rem; color: #0f172a; }
.es-step-toggle-summary::-webkit-details-marker { display: none; }
.es-step-toggle-summary::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid #64748b; border-bottom: 2px solid #64748b; transform: rotate(-45deg); transition: transform 0.2s; flex-shrink: 0; margin-left: 0.1rem; }
.es-step-toggle[open] > .es-step-toggle-summary::before { transform: rotate(45deg); }
.es-step-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.65rem; height: 1.65rem; border-radius: 6px; background: #e2e8f0; color: #334155; font-size: 0.85rem; font-weight: 700; }
.es-step-toggle-body { padding: 0 0 0.15rem 0.15rem; border-top: 1px solid #f1f5f9; margin-left: 2.35rem; }
.es-form-step-inner { margin-top: 0.5rem; }
.es-step-inline-hint { display: inline-block; margin-left: 0.5rem; max-width: 100%; vertical-align: middle; font-size: 0.85rem; }
@media (max-width: 560px) {
	.es-step-inline-hint { display: block; margin-left: 0; margin-top: 0.5rem; }
	.es-step-toggle-body { margin-left: 0; }
}

.es-dns-subtoggle { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 0 0.75rem; margin-top: 0.65rem; background: #fafafa; }
.es-dns-subtoggle[open] { padding-bottom: 0.65rem; }
.es-dns-subtoggle-summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 0.9rem; padding: 0.65rem 0; color: #334155; }
.es-dns-subtoggle-summary::-webkit-details-marker { display: none; }
.es-dns-subtoggle-summary::before { content: "+"; display: inline-block; width: 1.1rem; font-weight: 700; color: var(--es-primary, #2563eb); }
.es-dns-subtoggle[open] > .es-dns-subtoggle-summary::before { content: "−"; }
.es-dns-subtoggle-body { padding-bottom: 0.5rem; }
.es-dns-hosting-panel-inner { margin-top: 0; padding: 0.65rem 0.75rem; }

.es-domain-verify-cta { margin-top: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--es-card-border, #e2e8f0); border-radius: 10px; background: #f8fafc; }
.es-domain-verify-cta--highlight { border-color: var(--es-primary, #2563eb); background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%); box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12); }
.es-domain-verify-cta-head { display: flex; gap: 0.75rem; align-items: flex-start; }
.es-step-num--cta { background: var(--es-primary, #2563eb); color: #fff; flex-shrink: 0; }
.es-domain-verify-cta-title { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.es-domain-verify-cta-lead { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.es-domain-verify-cta-form { margin: 0.85rem 0 0; }
.es-domain-verify-cta-form .es-domain-verify-cta-actions { margin: 0; }

/* Form list: link + embed modal */
.es-form-link-cell .es-form-link-row { margin-bottom: 0.5rem; word-break: break-all; }
.es-form-link-cell .es-form-embed-row { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.es-form-preview-modal .es-form-preview-modal-box { max-width: 960px; }
.es-form-preview-frame-wrap { margin: 0 auto; max-width: 100%; background: #f1f5f9; border-radius: 8px; overflow: auto; }
.es-form-preview-iframe { display: block; border: 0; background: transparent; max-width: 100%; }

.es-embed-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }
.es-embed-modal[hidden] { display: none !important; }
.es-embed-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); cursor: pointer; }
.es-embed-modal-box { position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); border: 1px solid var(--es-card-border, #e2e8f0); }
.es-embed-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #f1f5f9; }
.es-embed-modal-title { margin: 0; font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.es-embed-modal-close { background: #f1f5f9; border: none; border-radius: 6px; color: #334155; font-size: 1.5rem; line-height: 1.1; cursor: pointer; padding: 0.25rem 0.55rem; }
.es-embed-modal-close:hover { background: #e2e8f0; }
.es-embed-modal-body { padding: 1rem 1.15rem 1.15rem; }
.es-embed-modal-form-label { margin: 0 0 0.5rem; font-weight: 600; color: #334155; }
.es-embed-modal-body > .es-muted { margin: 0 0 0.75rem; font-size: 0.9rem; line-height: 1.45; }
.es-embed-modal-textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, monospace; font-size: 0.8rem; line-height: 1.4; padding: 0.65rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; resize: vertical; min-height: 6rem; background: #f8fafc; color: #0f172a; }
.es-embed-modal-feedback { margin: 0.65rem 0 0; min-height: 1.25rem; font-size: 0.875rem; font-weight: 500; color: #065f46; }
.es-embed-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* Contacts list pagination (WordPress paginate_links) */
.es-contacts-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0.4rem 0.65rem;
	margin: 0;
	border-radius: 6px;
	font-size: 0.9rem;
	text-decoration: none;
	border: 1px solid var(--es-card-border);
	background: #fff;
	color: #334155;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.es-contacts-pagination a.page-numbers:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #0f172a;
}
.es-contacts-pagination span.page-numbers.current {
	background: var(--es-primary);
	border-color: var(--es-primary);
	color: #fff;
	font-weight: 600;
	cursor: default;
}
.es-contacts-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: auto;
	padding-left: 0.35rem;
	padding-right: 0.35rem;
	color: var(--es-muted);
}
.es-contacts-pagination a.prev.page-numbers,
.es-contacts-pagination a.next.page-numbers {
	min-width: auto;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

/* Modifica form (iscrizioni): campi e select più stretti, più spazio verticale */
.es-form-editor-wrap .es-form-editor-title {
	margin: 0 0 1rem;
	font-size: 1.35rem;
}
.es-form-editor-wrap .es-form-editor-lead {
	margin: 0 0 1.5rem;
	line-height: 1.5;
	max-width: 40rem;
}
#es-form-editor.es-form-editor-page.es-form > p {
	margin: 0 0 1.45rem;
}
#es-form-editor.es-form-editor-page.es-form > p.es-form-editor-actions {
	margin-bottom: 0;
	margin-top: 1.75rem;
}
#es-form-editor.es-form-editor-page input[type="text"],
#es-form-editor.es-form-editor-page select {
	max-width: 19rem;
	width: 100%;
	box-sizing: border-box;
}

/* Font coerente anche su placeholder (eredita dal campo) */
#es-form-editor.es-form-editor-page input[type="text"],
#es-form-editor.es-form-editor-page input[type="email"],
#es-form-editor.es-form-editor-page input[type="number"],
#es-form-editor.es-form-editor-page input[type="password"],
#es-form-editor.es-form-editor-page select,
#es-form-editor.es-form-editor-page textarea {
	font-family: inherit;
}

/* Campi “lunghi” (es. sottotitolo / testo pulsante) */
#es-form-editor.es-form-editor-page input[type="text"].es-input-wide {
	max-width: 21rem;
}

/* Placeholder (backend tenant): colore + leggibilità coerente */
#es-form-editor.es-form-editor-page input[type="text"]::placeholder,
#es-form-editor.es-form-editor-page input[type="email"]::placeholder,
#es-form-editor.es-form-editor-page input[type="number"]::placeholder,
#es-form-editor.es-form-editor-page textarea::placeholder {
	color: var(--es-muted);
	opacity: 0.9;
}
#es-form-editor.es-form-editor-page input[type="text"]::-webkit-input-placeholder,
#es-form-editor.es-form-editor-page input[type="email"]::-webkit-input-placeholder,
#es-form-editor.es-form-editor-page input[type="number"]::-webkit-input-placeholder,
#es-form-editor.es-form-editor-page textarea::-webkit-input-placeholder {
	color: var(--es-muted);
}
#es-form-editor.es-form-editor-page input[type="color"] {
	display: inline-block;
	width: 3.25rem;
	height: 2.5rem;
	padding: 0.15rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	cursor: pointer;
	vertical-align: middle;
	box-sizing: border-box;
}
#es-form-editor.es-form-editor-page textarea {
	max-width: 34rem;
	width: 100%;
	box-sizing: border-box;
	min-height: 4.5rem;
}
#es-form-editor.es-form-editor-page textarea.es-input-full {
	max-width: 34rem !important;
}
#es-form-editor.es-form-editor-page .es-form-editor-hint {
	display: block;
	margin: 0.55rem 0 0;
	max-width: 34rem;
	font-size: 0.9em;
	line-height: 1.45;
}
#es-form-editor.es-form-editor-page .es-form-editor-hint--block {
	margin-top: 0.65rem;
}
#es-form-editor.es-form-editor-page .es-form-editor-subheading {
	margin: 2rem 0 0.85rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
}

/* Accessibilità (allineato a WP) */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Pagina Contatti */
.es-page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	margin-bottom: 1.5rem;
}
.es-page-head-text { flex: 1 1 12rem; min-width: 0; }
.es-page-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.35rem; color: #111; }
.es-page-subtitle { margin: 0 0 0.5rem; color: var(--es-muted); font-size: 0.95rem; line-height: 1.45; }
.es-page-head-actions { flex-shrink: 0; }
.es-contacts-secondary-nav { margin: 0; font-size: 0.88rem; }
.es-contacts-secondary-nav a { color: var(--es-primary); text-decoration: none; font-weight: 500; }
.es-contacts-secondary-nav a:hover { text-decoration: underline; color: var(--es-primary-hover); }
.es-contacts-secondary-sep { margin: 0 0.35rem; color: #cbd5e1; }

.es-btn-icon-text {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}
.es-btn-icon-text .es-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }

.es-card {
	background: var(--es-card-bg);
	border: 1px solid var(--es-card-border);
	border-radius: var(--es-radius);
	box-shadow: var(--es-shadow);
	padding: 1.1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.es-contacts-new-panel { padding: 0; overflow: hidden; }
.es-contacts-new-panel-summary {
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	list-style: none;
	padding: 0.75rem 1.25rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--es-muted);
	border-bottom: 1px solid var(--es-card-border);
	user-select: none;
}
.es-contacts-new-panel-summary::-webkit-details-marker { display: none; }
.es-contacts-new-panel[open] .es-contacts-new-panel-summary { color: #334155; }
.es-contacts-new-panel-body { padding: 1rem 1.25rem 1.15rem; }
.es-summary-chevron {
	display: inline-flex;
	flex-shrink: 0;
	color: #64748b;
	transition: transform 0.2s ease;
}
.es-summary-chevron .es-icon {
	width: 1.05rem;
	height: 1.05rem;
}
details[open] > summary .es-summary-chevron {
	transform: rotate(180deg);
}
.es-form-compact .es-input-full { max-width: 100%; }
.es-form-row-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 1rem;
}
@media (min-width: 640px) {
	.es-form-row-2 { grid-template-columns: 1fr 1fr; }
}
.es-contacts-list-checkboxes { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }

.es-contacts-toolbar-bar {
	min-width: 0;
}
.es-contacts-toolbar-bar.es-card {
	padding: 0;
	overflow: hidden;
}
.es-contacts-toolbar-details {
	margin: 0;
}
.es-contacts-toolbar-summary {
	cursor: pointer;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.65rem;
	list-style: none;
	padding: 0.75rem 1.15rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--es-muted);
	border-bottom: 1px solid var(--es-card-border);
	user-select: none;
}
.es-contacts-toolbar-summary::-webkit-details-marker {
	display: none;
}
.es-contacts-toolbar-details[open] > .es-contacts-toolbar-summary {
	color: #334155;
	border-bottom-color: var(--es-card-border);
}
.es-contacts-toolbar-details-body {
	padding: 0.85rem 1.15rem 1.05rem;
}
.es-contacts-toolbar-active-badge {
	display: inline-block;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--es-primary);
	background: rgba(204, 0, 0, 0.08);
}
.es-contacts-toolbar-active-summary {
	flex: 1 1 100%;
	font-size: 0.82rem;
	font-weight: 500;
	color: #475569;
	line-height: 1.35;
}

.es-contacts-toolbar-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	min-width: 0;
}
@media (min-width: 960px) {
	.es-contacts-toolbar-grid {
		grid-template-columns: 1fr 20rem;
		grid-template-areas:
			"search export"
			"filters export"
			"sort export"
			"actions export";
		align-items: start;
	}
}
.es-contacts-toolbar-main-form {
	display: contents;
}
.es-contacts-toolbar-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 0.8rem 0.85rem;
	min-width: 0;
}
.es-contacts-toolbar-card--search { grid-area: search; }
.es-contacts-toolbar-card--filters { grid-area: filters; }
.es-contacts-toolbar-card--sort { grid-area: sort; }
.es-contacts-toolbar-card--export { grid-area: export; }
.es-contacts-toolbar-actions { grid-area: actions; }
.es-contacts-toolbar-card-title {
	margin: 0 0 0.55rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--es-muted);
}
.es-contacts-toolbar-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.75rem;
	align-items: flex-end;
}
.es-contacts-toolbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.es-contacts-toolbar-main-form .es-contacts-field-search {
	flex: 1 1 100%;
	min-width: 12rem;
	max-width: 100%;
	margin: 0;
}
.es-contacts-toolbar-main-form .es-contacts-field-select {
	margin: 0;
	flex: 0 1 auto;
	min-width: 9.5rem;
	max-width: 100%;
}
.es-contacts-tags-filter {
	margin: 0;
	flex: 0 1 auto;
	min-width: 12rem;
	max-width: 100%;
	position: relative;
}
.es-contacts-tags-filter-summary {
	cursor: pointer;
	list-style: none;
	user-select: none;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 0.45rem 0.65rem;
	background: #fff;
	white-space: nowrap;
}
.es-contacts-tags-filter-summary::-webkit-details-marker { display: none; }
.es-contacts-tags-filter-panel {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	z-index: 100;
	width: max-content;
	min-width: 20rem;
	max-width: min(32rem, 82vw);
	padding: 0.6rem 0.65rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
	max-height: 14rem;
	overflow: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
}
.es-contacts-toolbar-main-form .es-contacts-field-per-page { flex: 0 0 auto; min-width: 9rem; }
.es-contacts-toolbar-main-form .es-contacts-field-per-page label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--es-muted);
	margin-bottom: 0.25rem;
}
.es-contacts-toolbar-main-form .es-contacts-field-submit { margin: 0; flex: 0 0 auto; }
/* Toolbar contatti: niente margin-bottom globale .es-form sui select (evita allineamento spezzato) */
.es-contacts-toolbar-main-form.es-form select.es-input,
.es-contacts-toolbar-main-form.es-form .es-input-search {
	margin-bottom: 0;
}
.es-contacts-toolbar-card--export .es-contacts-export-form { margin: 0; }
.es-contacts-toolbar-card--export { height: fit-content; }
.es-contacts-export-hint {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.4;
	max-width: 26rem;
	word-break: normal;
	overflow-wrap: break-word;
}
.es-contacts-export-form { margin: 0; flex: 0 0 auto; }
@media (max-width: 900px) {
	.es-contacts-toolbar-grid {
		grid-template-columns: 1fr;
	}
}

.es-input-icon-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0 0.65rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	max-width: 22rem;
}
.es-input-icon-wrap .es-icon { width: 1.05rem; height: 1.05rem; color: var(--es-muted); flex-shrink: 0; }
.es-input-icon-wrap .es-input-search {
	border: none !important;
	margin: 0 !important;
	box-shadow: none !important;
	padding: 8px;
	flex: 1;
	min-width: 0;
	max-width: none !important;
}
.es-input-icon-wrap .es-input-search:focus { outline: none; }

.es-contacts-adv-filters {
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--es-card-border);
}
.es-contacts-toolbar-details-body > .es-contacts-adv-filters {
	margin-top: 0.85rem;
}
.es-contacts-adv-filters-summary {
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
	font-size: 0.88rem;
	color: #334155;
	list-style: none;
	user-select: none;
}
.es-contacts-adv-filters-summary::-webkit-details-marker { display: none; }
.es-contacts-adv-filters-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
	margin-top: 0.75rem;
}
.es-contacts-adv-filters-row p { margin: 0; }
.es-contacts-adv-filters-row label { display: block; margin-bottom: 0.3rem; font-size: 0.82rem; font-weight: 500; color: var(--es-muted); }
.es-contacts-adv-filters-form.es-form select.es-input { margin-bottom: 0; }
.es-contacts-adv-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.es-contacts-adv-hint { margin: 0.65rem 0 0; font-size: 0.82rem; line-height: 1.45; }

.es-contacts-empty {
	text-align: center;
	padding: 2.5rem 1.5rem;
	max-width: 28rem;
	margin-left: auto;
	margin-right: auto;
}
.es-contacts-empty-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
	color: #94a3b8;
}
.es-contacts-empty-icon .es-icon { width: 3rem; height: 3rem; }
.es-contacts-empty-title { margin: 0 0 0.5rem; font-size: 1.2rem; color: #0f172a; }
.es-contacts-empty-text { margin: 0 0 1.25rem; color: var(--es-muted); line-height: 1.5; font-size: 0.95rem; }
.es-contacts-empty-filtered { max-width: 32rem; }

.es-contacts-bulk-bar {
	margin-bottom: 1rem;
}
.es-contacts-bulk-bar.es-card {
	padding: 0;
	overflow: hidden;
}
.es-contacts-bulk-details {
	margin: 0;
}
.es-contacts-bulk-summary {
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	list-style: none;
	padding: 0.75rem 1.15rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--es-muted);
	border-bottom: 1px solid var(--es-card-border);
	user-select: none;
}
.es-contacts-bulk-summary::-webkit-details-marker {
	display: none;
}
.es-contacts-bulk-details[open] > .es-contacts-bulk-summary {
	color: #334155;
}
.es-contacts-bulk-details-body {
	padding: 0.75rem 1.15rem 0.9rem;
}
.es-contacts-bulk-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}
.es-contacts-bulk-select-all { margin: 0; }
.es-contacts-bulk-select-all-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	flex: 0 0 auto;
}
.es-contacts-bulk-select-all-hint {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.25;
	color: var(--es-muted);
}

/* Bulk tag rows: full-width band, checkboxes wrap, action button stays readable */
.es-bulk-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.45rem 0.75rem;
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
	padding-top: 0.55rem;
	margin-top: 0.15rem;
	border-top: 1px solid var(--es-card-border);
	font-size: 0.92rem;
	line-height: 1.45;
	color: #334155;
}
.es-bulk-tags-lead {
	flex: 0 0 auto;
	padding-top: 0.15rem;
	font-weight: 600;
	color: var(--es-muted);
}
.es-bulk-tags-checks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.65rem;
	flex: 1 1 12rem;
	min-width: 0;
	max-width: 100%;
}
.es-bulk-tags-picker {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1 1 14rem;
	min-width: 0;
	max-width: min(22rem, 100%);
}
.es-bulk-tags-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--es-muted);
	margin: 0;
}
.es-bulk-tags-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}
.es-bulk-tags-actions {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.4rem;
	flex: 0 0 auto;
}
/* Stesso pattern di “Cerca contatti”: bordo/padding su .es-input-icon-wrap + input senza bordo */
.es-bulk-tags-field .es-bulk-tags-input-wrap {
	display: flex;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
.es-bulk-tags-hint {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.35;
}
.es-bulk-tags-field { position: relative; flex: 1 1 12rem; min-width: 0; }
.es-bulk-tags-suggest {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 10;
	background: #fff;
	border: 1px solid #dbe3ee;
	border-radius: 10px;
	padding: 0.25rem;
	box-shadow: 0 10px 30px rgba(15,23,42,0.08);
	max-height: 210px;
	overflow: auto;
}
.es-bulk-tags-suggest[hidden] { display: none !important; }
.es-bulk-tags-suggest-item {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	padding: 0.4rem 0.55rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.875rem;
	color: #0f172a;
}
.es-bulk-tags-suggest-item:hover { background: #f1f5f9; }
.es-bulk-tag-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	min-height: 0;
}
.es-bulk-tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.12rem 0.4rem 0.12rem 0.5rem;
	border-radius: 999px;
	background: #f1f5f9;
	font-size: 0.8rem;
	font-weight: 500;
	color: #334155;
}
.es-bulk-tag-chip.is-new { background: #fff7ed; color: #9a3412; }
.es-bulk-tag-chip-remove {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0 0.15rem;
	margin: 0;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	color: #64748b;
	border-radius: 4px;
}
.es-bulk-tag-chip-remove:hover {
	color: #b91c1c;
	background: #fee2e2;
}
.es-bulk-tags-actions > .es-btn {
	flex: 0 0 auto;
	margin-top: 0;
}

.es-contact-badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}
.es-contact-badge--subscribed { background: #dcfce7; color: #166534; }
.es-contact-badge--pending { background: #ffedd5; color: #9a3412; }
.es-contact-badge--unsubscribed { background: #fee2e2; color: #991b1b; }
.es-contact-badge--unknown { background: #f1f5f9; color: #475569; }

.es-contacts-row-actions { white-space: normal; }
.es-contacts-row-actions .es-contact-quarantine-label { margin-left: 0.35rem; }
.es-contacts-quarantine-form { display: inline; margin-left: 0.35rem; }
.es-contact-quarantine-btn { font-size: 0.85rem; margin: 0; padding: 0; }

.es-contact-row { cursor: default; }
.es-contact-tip-popup {
	position: fixed;
	z-index: 100050;
	left: 0;
	top: 0;
	max-width: min(28rem, 94vw);
	padding: 0.8rem 1.05rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #f1f5f9;
	background: #1e293b;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, visibility 0.12s ease;
}
.es-contact-tip-popup.es-contact-tip-popup--visible {
	opacity: 1;
	visibility: visible;
}

.es-contacts-table-wrap {
	margin-top: 0.25rem;
	width: 100%;
}
.es-contacts-table { table-layout: auto; width: 100%; }
.es-contacts-table .es-col-check { width: 2.6rem; vertical-align: middle; }
.es-contacts-table .es-col-contact-email {
	min-width: 12rem;
	max-width: 28rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}
.es-contacts-table .es-col-contact-email a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #111;
	text-decoration: none;
}

.es-contacts-table .es-col-contact-email a:hover {
	text-decoration: underline;
}

.es-contacts-table .es-col-contact-actions a {
	color: #111;
	text-decoration: none;
}

.es-contacts-table .es-col-contact-actions a:hover {
	text-decoration: underline;
}
.es-contacts-table .es-col-contact-name {
	min-width: 4.5rem;
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}
.es-contacts-table .es-col-contact-status { width: 1%; white-space: nowrap; vertical-align: middle; }
.es-contacts-table th.es-col-contact-tags { white-space: nowrap; }
.es-contacts-table .es-col-contact-tags { min-width: 9rem; width: auto; white-space: normal; vertical-align: middle; }
.es-contact-tags-pills { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.es-contact-tag-pill { font-size: 0.72rem; padding: 0.16rem 0.5rem; }
.es-contacts-table th.es-col-contact-deliv { white-space: nowrap; }
.es-contacts-table .es-col-contact-deliv {
	min-width: 9.5rem;
	width: 1%;
	vertical-align: middle;
}
.es-contacts-table .es-col-contact-actions { width: 1%; white-space: nowrap; vertical-align: middle; }
@media (max-width: 900px) {
	.es-contacts-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.es-contacts-table { min-width: 52rem; }
	.es-contacts-adv-filters-row {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.25rem;
	}
	.es-contacts-adv-filters-row p {
		flex: 0 0 auto;
		min-width: 9rem;
	}
	.es-contacts-adv-filters-row p.es-contacts-adv-actions {
		min-width: 0;
	}
}

.es-contacts-page-summary-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin: 0 0 0.75rem;
	font-size: 0.9em;
}
.es-contacts-page-summary-row .es-contacts-per-page-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0;
}
.es-contacts-page-summary-row .es-contacts-per-page-inline .es-input {
	min-width: 4.5rem;
}

/* Campagne: riga programmata + modale programma invio */
.es-newsletters-table tr.es-newsletter-row-scheduled {
	background: #e8f4fc;
}
.es-newsletters-table tr.es-newsletter-row-scheduled:nth-child(even) {
	background: #ddeef8;
}
.es-newsletter-actions {
	white-space: normal;
	line-height: 1.55;
}
.es-newsletter-actions .es-btn-link {
	display: inline;
	padding: 0;
	margin: 0;
	border: none;
	background: none;
	color: var(--es-primary);
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
}
.es-newsletter-actions .es-btn-link:hover {
	color: var(--es-primary-hover);
}

.es-schedule-modal {
	position: fixed;
	inset: 0;
	z-index: 100060;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}
.es-schedule-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
}
.es-schedule-modal-box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 26rem;
	background: var(--es-card-bg);
	border: 1px solid var(--es-card-border);
	border-radius: var(--es-radius);
	box-shadow: var(--es-shadow-lg);
	overflow: hidden;
}
.es-schedule-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1.1rem;
	border-bottom: 1px solid var(--es-card-border);
}
.es-schedule-modal-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #0f172a;
}
.es-schedule-modal-close {
	border: none;
	background: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--es-muted);
	padding: 0 0.15rem;
}
.es-schedule-modal-body {
	padding: 1rem 1.1rem 0.25rem;
}
.es-schedule-modal-body label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--es-muted);
	margin-bottom: 0.35rem;
}
.es-schedule-modal-body .es-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.es-schedule-modal-hint {
	margin: 0.5rem 0 0;
	font-size: 0.82rem;
	line-height: 1.45;
}
.es-schedule-modal-feedback {
	margin: 0.65rem 0 0;
	font-size: 0.88rem;
	color: #b91c1c;
}
.es-schedule-modal-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 0.85rem 1.1rem 1rem;
	border-top: 1px solid var(--es-card-border);
	background: #fafafa;
}

.es-newsletter-scheduled-preview-notice {
	padding: 0.75rem 1rem;
	background: #e8f4fc;
	border-radius: 8px;
	border-left: 4px solid #0284c7;
	max-width: 40rem;
	line-height: 1.5;
	margin-bottom: 1rem;
}

/* Guide utente (vademecum) */
.es-guide-index {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.es-guide-card {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	background: var(--es-card-bg);
	border: 1px solid var(--es-card-border);
	border-radius: var(--es-radius);
	box-shadow: var(--es-shadow);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.es-guide-card:hover {
	border-color: var(--es-primary);
	box-shadow: var(--es-shadow-lg);
	color: inherit;
}
.es-guide-card-icon {
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--es-bg);
	color: var(--es-primary);
}
.es-guide-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}
.es-guide-card-title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--es-text);
}
.es-guide-card-summary {
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--es-muted);
}
.es-guide-article .es-guide-lead {
	font-size: 1.05rem;
	line-height: 1.55;
	margin: 0 0 1.25rem;
}
.es-guide-body .es-guide-section {
	margin-bottom: 1.75rem;
}
.es-guide-body .es-guide-section h2 {
	font-size: 1.1rem;
	margin: 0 0 0.65rem;
}
.es-guide-body .es-guide-section h3 {
	font-size: 1rem;
	margin: 0 0 0.45rem;
}
.es-guide-body .es-guide-section p,
.es-guide-body .es-guide-section li {
	line-height: 1.55;
	margin: 0 0 0.65rem;
}
.es-guide-list {
	margin: 0 0 0.75rem 1.1rem;
	padding: 0;
}
.es-guide-faq .es-guide-faq-item {
	padding: 0.85rem 0;
	border-top: 1px solid var(--es-card-border);
}
.es-guide-faq .es-guide-faq-item:first-of-type {
	border-top: 0;
	padding-top: 0;
}
