/**
 * Aimtell admin screens.
 * Matches the aimtell.com look: Montserrat, green buttons, 16px cards.
 * Everything is scoped to .at-app so WordPress admin styles are left alone.
 */

.aimtell-admin #wpwrap,
.aimtell-admin #wpcontent,
.aimtell-admin #wpbody-content {
	background: #f7f9fc;
}

.at-app {
	--at-ink: #101822;
	--at-body: #545e6e;
	--at-muted: #5a6475;
	--at-subtle: #7b8798;
	--at-line: #e3eaf2;
	--at-line-soft: #edf1f6;
	--at-input: #d7e0ea;
	--at-tint: #f7f9fc;
	--at-green: #00822c;
	--at-green-hover: #00631f;
	--at-green-ink: #00661f;
	--at-green-tint: #e8f7ed;
	--at-green-soft: #f5faf7;
	--at-amber-bg: #fdf0e1;
	--at-amber-ink: #8a4b00;
	--at-blue-bg: #e9f0fe;
	--at-blue-ink: #1d4fb8;
	--at-red: #b42318;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	color: var(--at-ink);
	font-size: 14px;
	line-height: 1.5;
	padding: 28px 24px 64px 4px;
	-webkit-font-smoothing: antialiased;
}

.at-app *,
.at-app *::before,
.at-app *::after {
	box-sizing: border-box;
}

.at-app a { color: var(--at-green); }
.at-app a:hover { color: var(--at-green-hover); }
.at-app h1, .at-app h2, .at-app h3 { color: var(--at-ink); margin: 0; text-wrap: balance; }
.at-app h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.024em; line-height: 1.15; padding: 0; }
.at-app h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.at-app h3 { font-size: 16px; font-weight: 700; }
.at-app p { margin: 0; font-size: 14px; }
.at-app [hidden] { display: none !important; }

/* Layout */
.at-wrap { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.at-wrap--narrow { max-width: 860px; }
.at-wrap--signin { max-width: 480px; padding-top: 36px; }
.at-wrap--connect { max-width: 720px; padding-top: 28px; }
.at-stack { display: flex; flex-direction: column; gap: 16px; }
.at-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.at-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.at-split > .at-main { flex: 999 1 560px; min-width: 0; }
.at-split > .at-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.at-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.at-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }

.at-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.at-head > div:first-child { display: flex; flex-direction: column; gap: 6px; flex: 1 1 420px; }
.at-lede { font-size: 15px !important; color: var(--at-body); max-width: 64ch; line-height: 1.55; }
.at-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--at-green); }
.at-muted { color: var(--at-muted); }
.at-small { font-size: 13px !important; color: var(--at-muted); line-height: 1.5; }
.at-tiny { font-size: 12px !important; color: var(--at-subtle); }
.at-num { font-variant-numeric: tabular-nums; }
.at-center { text-align: center; }
.at-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards */
.at-card { background: #fff; border: 1px solid var(--at-line); border-radius: 16px; box-shadow: 0 16px 44px -28px rgba(16, 24, 34, .4); }
.at-card--pad { padding: 28px; }
.at-card--signin { padding: 44px; display: flex; flex-direction: column; gap: 24px; }
.at-card--flush { overflow: hidden; }
.at-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 10px; }
.at-card__foot { padding: 14px 18px; font-size: 12px; color: var(--at-subtle); border-top: 1px solid var(--at-line-soft); }
.at-band { background: var(--at-tint); border-top: 1px solid var(--at-line); border-bottom: 1px solid var(--at-line); padding: 22px 28px; display: flex; flex-direction: column; gap: 8px; }

/* Buttons */
.at-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 0;
	background: var(--at-green); color: #fff !important; text-decoration: none;
	font: 600 14px/1.2 'Montserrat', sans-serif; cursor: pointer; white-space: nowrap;
}
.at-btn:hover { background: var(--at-green-hover); }
.at-btn:focus-visible, .at-tab:focus-visible, .at-pick:focus-visible, .at-linkbtn:focus-visible, .at-choice:focus-within { outline: 2px solid var(--at-green); outline-offset: 2px; }
.at-btn[disabled] { opacity: .55; cursor: not-allowed; }
.at-btn--block { width: 100%; }
.at-btn--ghost { background: #fff; color: var(--at-ink) !important; border: 1px solid var(--at-input); }
.at-btn--ghost:hover { background: var(--at-green-soft); }
.at-btn--danger { background: #fff; color: var(--at-red) !important; border: 1px solid #f1c9c4; }
.at-btn--danger:hover { background: #fdf3f2; }
.at-btn--white { background: #fff; color: var(--at-green-ink) !important; }
.at-btn--white:hover { background: #eefaf2; }
.at-btn--outline-light { background: transparent; border: 1px solid rgba(255, 255, 255, .4); }
.at-btn--outline-light:hover { background: rgba(255, 255, 255, .08); }
.at-btn--small { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.at-linkbtn { background: transparent; border: 0; padding: 8px 4px; min-height: 40px; font: 600 14px 'Montserrat', sans-serif; color: var(--at-green); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.at-linkbtn:hover { color: var(--at-green-hover); }
.at-linkbtn--muted { color: var(--at-muted); }
.at-spacer { margin-left: auto; }

/* Forms */
.at-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: #3c4655; margin: 0 0 6px; }
.at-label small { font-weight: 500; color: var(--at-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.at-app input[type=text], .at-app input[type=email], .at-app input[type=password], .at-app input[type=url],
.at-app input[type=number], .at-app input[type=date], .at-app input[type=time], .at-app select, .at-app textarea {
	width: 100%; max-width: none; min-height: 44px; border: 1px solid var(--at-input); border-radius: 10px;
	padding: 10px 12px; font: 15px/1.4 'Montserrat', sans-serif; color: var(--at-ink); background-color: #fff; box-shadow: none;
}
.at-app select { padding-right: 32px; }
.at-app input:focus, .at-app select:focus, .at-app textarea:focus { border-color: var(--at-green); box-shadow: 0 0 0 3px rgba(0, 130, 44, .15); outline: none; }
.at-app input[readonly] { background: var(--at-tint); border-color: var(--at-line); }
.at-app input[type=checkbox], .at-app input[type=radio] { accent-color: var(--at-green); width: 18px; height: 18px; margin: 0; }
.at-app input.at-w-auto, .at-app select.at-w-auto { width: auto; }
.at-app input.at-w-num { width: 84px; }
.at-check { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 32px; cursor: pointer; }
.at-hint { margin-top: 6px !important; font-size: 13px !important; color: var(--at-muted); }
.at-static { border: 1px solid var(--at-line); background: var(--at-tint); border-radius: 10px; padding: 11px 14px; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.at-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.at-fieldset legend { padding: 0; width: 100%; }

/* Notices inside our screens */
.at-alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.55; border: 1px solid; }
.at-alert--error { background: #fdf3f2; border-color: #f1c9c4; color: #7a1b13; }
.at-alert--warn { background: #fdf6ec; border-color: #f3dcb8; color: #5c3a00; }
.at-alert--info { background: var(--at-tint); border-color: var(--at-line); color: #3c4655; }
.at-alert--ok { background: var(--at-green-soft); border-color: #cbe9d4; color: var(--at-green-ink); }

/* Chips, dots, divider */
.at-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 4px 8px; background: #f1f4f8; color: #3c4655; white-space: nowrap; }
.at-chip--green { background: var(--at-green-tint); color: var(--at-green-ink); }
.at-chip--blue { background: var(--at-blue-bg); color: var(--at-blue-ink); }
.at-chip--amber { background: var(--at-amber-bg); color: var(--at-amber-ink); }
.at-dot { width: 8px; height: 8px; border-radius: 50%; background: #00a838; display: inline-block; }
.at-divider { display: flex; align-items: center; gap: 12px; color: #94a0b0; font-size: 13px; }
.at-divider::before, .at-divider::after { content: ""; flex: 1; height: 1px; background: var(--at-line); }
.at-logo { width: 104px; height: auto; align-self: center; }

/* Sample-data banner */
.at-demo { background: #121b25; color: #fff; border-radius: 16px; padding: 18px 22px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.at-demo__icon { width: 36px; height: 36px; border-radius: 9px; background: rgba(124, 240, 166, .16); display: grid; place-items: center; flex: none; color: #7cf0a6; }
.at-demo__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.at-demo__text strong { font-size: 15px; color: #fff; }
.at-demo__text span { font-size: 14px; color: #c4cfdb; }

/* Stats */
.at-stat { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.at-stat__k { font-size: 13px; font-weight: 600; color: var(--at-muted); }
.at-stat__v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.at-stat__d { font-size: 12px; font-weight: 600; color: var(--at-green-ink); }
.at-stat__d--down { color: var(--at-amber-ink); }
.at-stat__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.at-inline-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.at-inline-stats div { display: flex; flex-direction: column; gap: 2px; }
.at-inline-stats b { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.at-inline-stats span { font-size: 13px; color: var(--at-muted); font-weight: 600; }

/* Chart */
.at-chart { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
.at-chart__y { height: 260px; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--at-muted); text-align: right; font-variant-numeric: tabular-nums; margin: -7px 0; }
.at-chart__plot { position: relative; height: 260px; }
.at-chart__grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.at-chart__grid span { border-top: 1px dashed var(--at-line); }
.at-chart__grid span:last-child { border-top: 1px solid var(--at-input); }
.at-chart__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.at-chart__x { display: flex; justify-content: space-between; font-size: 12px; color: var(--at-muted); }
.at-chart__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--at-muted); font-size: 14px; }

/* Tabs and pickers */
.at-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.at-tab { font: 600 13px 'Montserrat', sans-serif; min-height: 38px; padding: 8px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--at-muted); cursor: pointer; }
.at-tab[aria-selected=true] { background: var(--at-ink); color: #fff; }
.at-tabs--boxed .at-tab { border: 1px solid var(--at-input); background: #fff; color: #3c4655; }
.at-tabs--boxed .at-tab[aria-selected=true] { border-color: var(--at-ink); background: var(--at-ink); color: #fff; }
.at-tabbar { padding: 12px 14px; border-bottom: 1px solid var(--at-line); }
.at-pick { display: flex; justify-content: space-between; gap: 10px; align-items: center; text-align: left; font: 500 14px 'Montserrat', sans-serif; min-height: 44px; padding: 8px 12px; border-radius: 9px; cursor: pointer; color: var(--at-ink); background: #fff; border: 1px solid var(--at-input); width: 100%; }
.at-pick[aria-pressed=true] { border: 2px solid var(--at-green); padding: 7px 11px; }
.at-pick span:last-child { font-size: 12px; color: var(--at-muted); white-space: nowrap; }
.at-pill { font: 600 13px 'Montserrat', sans-serif; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--at-input); background: #fff; cursor: pointer; color: #3c4655; }
.at-pill:hover, .at-pill[aria-pressed=true] { border-color: var(--at-green); background: var(--at-green-soft); color: var(--at-green-ink); }
.at-choice { display: flex; gap: 14px; align-items: center; border: 1px solid var(--at-input); border-radius: 12px; padding: 14px; cursor: pointer; }
.at-choice.is-on { border: 2px solid var(--at-green); background: var(--at-green-soft); padding: 13px; }
.at-choice--new { border-style: dashed; }
.at-choice--new.is-on { border-style: solid; }
.at-choice__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.at-choice__body strong { font-size: 15px; }
.at-choice__body span { font-size: 13px; color: var(--at-muted); overflow-wrap: anywhere; }

/* Site icons */
.at-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; background: #f1f4f8; color: var(--at-muted); overflow: hidden; }
.at-ic img { width: 100%; height: 100%; object-fit: cover; }
.at-ic--lg { width: 56px; height: 56px; }
.at-iconbox { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1px solid var(--at-line); border-radius: 12px; padding: 14px; }
.at-iconbox--empty { border: 1.5px dashed #c4cfdb; }
.at-iconbox > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }

/* Push icon and image pickers */
.at-media { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--at-line); border-radius: 12px; padding: 12px; }
.at-media__thumb { width: 48px; height: 48px; border-radius: 10px; background: #f1f4f8; color: var(--at-subtle); display: grid; place-items: center; overflow: hidden; flex: none; }
.at-media__thumb--wide { width: 96px; }
.at-media__thumb img { width: 100%; height: 100%; object-fit: cover; }
.at-media__body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; min-width: 0; }
.at-media__body strong { font-size: 14px; }
.at-media__body > span:nth-child(2) { font-size: 13px; color: var(--at-muted); overflow-wrap: anywhere; }

/* Tables */
.at-tablewrap { overflow-x: auto; }
.at-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.at-table th { font-size: 12px; font-weight: 600; color: var(--at-muted); text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--at-line); white-space: nowrap; }
.at-table td { padding: 15px 18px; border-bottom: 1px solid var(--at-line-soft); vertical-align: middle; color: var(--at-ink); }
.at-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.at-table .dim { color: var(--at-body); }
.at-table .actions { text-align: right; white-space: nowrap; }
.at-rowbtn { font: 600 14px 'Montserrat', sans-serif; background: transparent; border: 0; padding: 0; color: var(--at-ink); cursor: pointer; text-align: left; }
.at-rowbtn:hover { color: var(--at-green); }
.at-empty { padding: 36px 18px; text-align: center; color: var(--at-muted); font-size: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.at-empty strong { color: var(--at-ink); font-size: 16px; }
.at-loading { padding: 36px 18px; text-align: center; color: var(--at-muted); font-size: 14px; }

/* Quick actions */
.at-qa { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; text-decoration: none; color: var(--at-ink) !important; }
.at-qa:hover { background: var(--at-green-soft); }
.at-qa__ic { width: 36px; height: 36px; border-radius: 9px; background: #eef7f1; display: grid; place-items: center; flex: none; color: var(--at-green); }
.at-qa__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.at-qa__body strong { font-size: 14px; }
.at-qa__body span { font-size: 13px; color: var(--at-muted); }
.at-kvline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }

/* Push preview */
.at-preview { background: linear-gradient(176deg, #009933, #008a2e 52%, #007d29); border-radius: 16px; padding: 22px; }
.at-push { background: #fff; color: var(--at-ink); border-radius: 14px; box-shadow: 0 28px 58px -20px rgba(0, 48, 18, .5); overflow: hidden; }
.at-push__top { display: flex; gap: 12px; padding: 14px 16px; }
.at-push__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.at-push__text strong { font-size: 14px; overflow-wrap: anywhere; }
.at-push__text span { font-size: 13px; color: var(--at-body); line-height: 1.45; overflow-wrap: anywhere; }
.at-push__text em { font-style: normal; font-size: 12px; color: var(--at-subtle); }
.at-push__img { display: block; width: 100%; height: 150px; object-fit: cover; background: #f1f4f8; }
.at-composer { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.at-composer__form { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.at-composer__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 52px; }
.at-starter { background: var(--at-green-soft); border: 1px solid #d8eedf; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.at-app details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #3c4655; min-height: 32px; display: flex; align-items: center; }
.at-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid var(--at-line); padding-top: 20px; }

/* Segment builder */
.at-cond { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid #dde5ef; border-radius: 12px; padding: 10px; }
.at-cond select:nth-child(1) { flex: 1 1 200px; width: auto; }
.at-cond select:nth-child(2) { flex: 0 1 160px; width: auto; }
.at-cond input { flex: 1 1 170px; width: auto; min-width: 0; }
.at-join { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--at-muted); padding: 2px 10px; background: #f1f4f8; border-radius: 999px; }
.at-x { width: 40px; height: 40px; border-radius: 9px; border: 0; background: transparent; color: var(--at-subtle); cursor: pointer; display: grid; place-items: center; }
.at-x:hover { background: #f1f4f8; color: var(--at-ink); }
.at-bigcount { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--at-green-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }

/* Toggle switch */
.at-switch { flex: none; width: 46px; height: 26px; border-radius: 999px; padding: 3px; border: 0; background: #94a0b0; cursor: pointer; display: flex; justify-content: flex-start; }
.at-switch::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.at-switch[aria-checked=true] { background: var(--at-green); justify-content: flex-end; }
.at-switch:focus-visible { outline: 2px solid var(--at-green); outline-offset: 2px; }
.at-switchpill { display: inline-flex; align-items: center; gap: 10px; font: 600 14px 'Montserrat', sans-serif; min-height: 44px; padding: 8px 16px 8px 8px; border-radius: 999px; cursor: pointer; border: 1px solid var(--at-input); background: #fff; color: var(--at-muted); }
.at-switchpill[aria-pressed=true] { border-color: var(--at-green); background: var(--at-green-tint); color: var(--at-green-ink); }
.at-switchpill .at-switch { pointer-events: none; }
.at-switchpill[aria-pressed=true] .at-switch { background: var(--at-green); justify-content: flex-end; }

/* Settings */
.at-sec { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.at-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; font-size: 14px; margin: 0; }
.at-kv dt { color: var(--at-muted); font-weight: 600; }
.at-kv dd { margin: 0; overflow-wrap: anywhere; }
.at-feat { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--at-line-soft); }
.at-feat:first-child { border-top: 0; padding-top: 0; }
.at-feat__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.at-feat__body strong { font-size: 15px; }
.at-feat__body > span { font-size: 14px; color: var(--at-body); line-height: 1.55; }
.at-is-disabled { opacity: .5; pointer-events: none; }
.at-mono { font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.at-tok { font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 13px; background: var(--at-green-tint); color: var(--at-green-ink); border-radius: 6px; padding: 2px 6px; }

/* RSS */
.at-rsshead { padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.at-rsshead > div:first-child { flex: 1 1 360px; display: flex; flex-direction: column; gap: 6px; }
.at-section { display: flex; flex-direction: column; gap: 12px; padding: 22px 0; border-top: 1px solid var(--at-line-soft); }
.at-section:first-child { border-top: 0; }
.at-logrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--at-line-soft); align-items: center; }
.at-logrow strong { font-size: 14px; }
.at-logrow span:nth-child(3) { font-size: 13px; color: var(--at-muted); }

@media (max-width: 782px) {
	.at-app { padding: 20px 12px 48px 0; }
	.at-card--signin { padding: 28px 20px; }
	.at-card--pad, .at-sec { padding: 22px 18px; }
	.at-band { padding: 18px; }
	.at-composer__side { position: static; }
}

@media (prefers-reduced-motion: reduce) {
	.at-app * { transition: none !important; }
}
