/* Accounts Dashboard – all styling.
 * The dashboard pages are standalone screens (no theme, no admin bar), so it
 * feels like its own application rather than a WordPress page.
 *
 * Light / dark mode: every colour is a variable below; dark mode only swaps
 * the variables (html[data-theme="dark"]). New styles should use variables.
 *
 * Sections: colours · page shell · sidebar · top bar · page header · buttons &
 * filters · cards · charts · lists · tables · tags & badges · settings ·
 * messages · responsive
 */

/* Inter (bundled, so no outside font service is needed). Two files: Latin, and Latin Extended which includes the ₹ sign. */
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Colours & sizes (change the look here) ---------- */
.ad-app, .ad-auth {
	--bg: #f3f4f6;
	--panel: #ffffff;
	--line: #eaecf0;
	--line-strong: #dfe2e7;
	--text: #111827;
	--muted: #6b7280;
	--faint: #9ca3af;
	--ink: #111827;          /* primary buttons, active menu item */
	--on-ink: #ffffff;       /* text on --ink */
	--ink-hover: #262f40;
	--brand: #d0175a;        /* Coalesce crimson */
	--accent: #14a38b;       /* received money, charts, links */
	--accent-soft: #e5f6f2;
	--good: #12946f;
	--good-soft: #e3f5ee;
	--warn: #c26a05;
	--warn-soft: #fdf1df;
	--bad: #d92d20;
	--bad-soft: #fdecea;
	--orange: #e2591b;
	--orange-soft: #fdeee6;
	--info: #3b72d9;
	--info-soft: #e9f0fc;
	--soft: #f3f4f6;
	--text-2: #374151;
	--text-3: #4b5563;
	--subtle: #f9fafb;       /* table headers */
	--hover: #fafbfc;
	--check-border: #c3c8d0;
	--field-hover: #c4c9d2;
	--overlay: rgba(17, 24, 39, .42);
	--shadow-lg: 0 18px 44px rgba(17, 24, 39, .16), 0 2px 6px rgba(17, 24, 39, .06);
	--hero-grad: linear-gradient(140deg, #dff3ee 0%, #eaf6f4 45%, #f4f9fb 100%);
	--hero-line: #d4ece6;
	--bar-s: #cfd5dd;
	--bar-s-future: #e3e7ec;
	--grid: #eef0f3;
	--info-text: #1f3f7a;
	--warn-text: #7a4504;
	--bad-text: #9b1c13;
	--bad-line: #f3c7c3;
	--bad-strong: #d92d20;
	--bad-strong-hover: #b42318;
	--dirty: #fffbeb;
	--glass: rgba(255, 255, 255, .96);
	--glass-soft: rgba(255, 255, 255, .7);
	--top-glass: rgba(243, 244, 246, .86);
	--switch-off: #d1d5db;
	--input-bg: #f7f8fa;
	--input-line: #e1e5ec;
	--auth-bg: radial-gradient(1200px 600px at 10% -10%, #e9eef8 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #f6e9ec 0%, transparent 55%), #f1f3f7;
	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 2px 8px rgba(17, 24, 39, .04);
	--side-w: 264px;
	--side-w-collapsed: 84px;
}

/* Dark mode: the same variables, darker values. */
html[data-theme="dark"] .ad-app, html[data-theme="dark"] .ad-auth {
	--bg: #0e1116;
	--panel: #161a21;
	--line: #252b35;
	--line-strong: #333a46;
	--text: #e7e9ee;
	--muted: #9aa3b2;
	--faint: #6f7886;
	--ink: #e7e9ee;
	--on-ink: #0e1116;
	--ink-hover: #ffffff;
	--brand: #ec4f86;
	--accent: #2ec4a5;
	--accent-soft: rgba(46, 196, 165, .15);
	--good: #3ccf9b;
	--good-soft: rgba(60, 207, 155, .14);
	--warn: #f2b155;
	--warn-soft: rgba(242, 177, 85, .14);
	--bad: #ff7b6e;
	--bad-soft: rgba(255, 123, 110, .14);
	--orange: #f59a62;
	--orange-soft: rgba(245, 154, 98, .14);
	--info: #7aa7f5;
	--info-soft: rgba(122, 167, 245, .14);
	--soft: #1e232c;
	--text-2: #c8cdd6;
	--text-3: #aab2be;
	--subtle: #1a1e26;
	--hover: #1b2029;
	--check-border: #4a5260;
	--field-hover: #46505e;
	--overlay: rgba(0, 0, 0, .6);
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
	--shadow-lg: 0 18px 44px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
	--hero-grad: linear-gradient(140deg, #10302a 0%, #13292a 45%, #171c24 100%);
	--hero-line: #1f3d37;
	--bar-s: #3a424f;
	--bar-s-future: #2a313b;
	--grid: #232a33;
	--info-text: #b9cff8;
	--warn-text: #f6cf96;
	--bad-text: #ffb3ab;
	--bad-line: #5a2a26;
	--bad-strong: #d6453a;
	--bad-strong-hover: #e5574c;
	--dirty: rgba(240, 166, 58, .08);
	--glass: rgba(22, 26, 33, .96);
	--glass-soft: rgba(22, 26, 33, .75);
	--top-glass: rgba(14, 17, 22, .86);
	--switch-off: #3a414d;
	--input-bg: #1b2028;
	--input-line: #2c333e;
	--auth-bg: radial-gradient(1200px 600px at 10% -10%, #18233a 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #2a1622 0%, transparent 55%), #0b0e13;
	color-scheme: dark;
}
html.ad-theme-anim .ad-app *, html.ad-theme-anim .ad-auth * { transition: background-color .2s, border-color .2s, color .2s !important; }

/* Logo for light / dark backgrounds */
html:not([data-theme="dark"]) .ad-only-dark, html[data-theme="dark"] .ad-only-light { display: none !important; }

/* ---------- Page shell ---------- */
body.ad-standalone { margin: 0; background: #f3f4f6; }
html[data-theme="dark"] body.ad-standalone { background: #0e1116; }

.ad-app {
	position: fixed;
	inset: 0;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.5 "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
}
.ad-app *, .ad-app *::before, .ad-app *::after { box-sizing: border-box; }
.ad-app button, .ad-app select, .ad-app input, .ad-app textarea { font: inherit; color: inherit; }
.ad-app h1, .ad-app h2, .ad-app p { margin: 0; }
.ad-app a { color: var(--accent); text-decoration: none; }
.ad-app [hidden] { display: none !important; }
.ad-boot, .ad-loading { padding: 48px; color: var(--muted); text-align: center; }
.is-loading { opacity: .55; transition: opacity .2s; pointer-events: none; }

.ad-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.ad-shell { display: flex; height: 100%; }

/* ---------- Sidebar (sticky – the content scrolls beside it) ---------- */
.ad-side {
	width: var(--side-w);
	flex: none;
	height: 100%;
	overflow-y: auto;
	background: var(--panel);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	padding: 22px 16px 18px;
	transition: width .2s ease, padding .2s ease;
}
.ad-side__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px 26px; }
.ad-logo { display: block; height: 40px; flex: none; }
.ad-logo img { height: 40px; width: auto; max-width: 168px; object-fit: contain; object-position: left center; display: block; }
.ad-side__toggle { color: var(--muted); }
.ad-side__caption { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 14px 10px; }

.ad-nav { display: flex; flex-direction: column; gap: 4px; }
.ad-nav__item {
	display: flex; align-items: center; gap: 14px;
	height: 46px; padding: 0 14px; border-radius: 14px;
	color: var(--text-3) !important; font-weight: 500; font-size: 15px; white-space: nowrap;
	transition: background .15s, color .15s;
}
.ad-nav__item:hover { background: var(--soft); color: var(--text) !important; }
.ad-nav__item.is-active { background: var(--ink); color: var(--on-ink) !important; box-shadow: 0 6px 16px rgba(17, 24, 39, .18); }
.ad-nav__item:focus-visible, .ad-iconbtn:focus-visible, .ad-btn:focus-visible, .ad-segtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-nav__item--quiet { font-size: 14px; height: 40px; color: var(--muted) !important; }

.ad-side__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }

/* Collapsed sidebar: icons only (desktop) */
.ad-collapsed .ad-side { width: var(--side-w-collapsed); padding-left: 14px; padding-right: 14px; }
.ad-collapsed .ad-side__head { flex-direction: column; padding: 0 0 22px; gap: 14px; }
.ad-collapsed .ad-logo img { width: 38px; height: 40px; object-fit: cover; object-position: left center; }
.ad-collapsed .ad-side__caption { visibility: hidden; height: 0; padding: 0; }
.ad-collapsed .ad-nav__label { display: none; }
.ad-collapsed .ad-nav__item { justify-content: center; padding: 0; }
.ad-collapsed .ad-side__toggle .ad-icon { transform: scaleX(-1); }

/* ---------- Main area & top bar ---------- */
.ad-main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; }
.ad-top {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; gap: 14px;
	height: 72px; padding: 0 32px;
	background: var(--top-glass);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.ad-crumb { color: var(--muted); font-size: 13px; font-weight: 500; }
.ad-top__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ad-today { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-size: 13px; font-weight: 600; color: var(--text); padding-right: 14px; margin-right: 2px; border-right: 1px solid var(--line); }
.ad-today small { font-size: 11px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.ad-user {
	display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; background: none; cursor: pointer;
	padding: 4px 10px 4px 4px; border-radius: 999px; text-align: left; color: var(--text); transition: background .15s, border-color .15s;
}
.ad-user:hover, .ad-user:focus-visible { background: var(--panel); border-color: var(--line); outline: none; }
.ad-user > .ad-icon { width: 16px; height: 16px; color: var(--muted); }
.ad-avatar {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 14px;
}
.ad-user__text { display: flex; flex-direction: column; line-height: 1.25; }
.ad-user__text small { color: var(--muted); font-size: 12px; }

.ad-iconbtn {
	width: 38px; height: 38px; border-radius: 12px; flex: none;
	display: grid; place-items: center; cursor: pointer;
	border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.ad-iconbtn:hover { background: var(--soft); }
.ad-iconbtn.ad-top__menu { display: none; }

/* ---------- Page header ---------- */
.ad-page { padding: 28px 32px 56px; max-width: 1480px; }
.ad-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ad-pagehead h1 { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.ad-pagehead p { color: var(--muted); margin-top: 4px; }
.ad-pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons & filters ---------- */
.ad-btn {
	display: inline-flex; align-items: center; gap: 8px;
	height: 42px; padding: 0 18px; border-radius: 999px;
	background: var(--panel); border: 1px solid var(--line-strong);
	color: var(--text) !important; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.ad-btn:hover { background: var(--soft); }
.ad-btn .ad-icon { width: 18px; height: 18px; }
.ad-btn--primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink) !important; }
.ad-btn--primary:hover { background: var(--ink-hover); }
.ad-btn.is-disabled { opacity: .45; cursor: not-allowed; }

/* Filter bar: one tidy row of equal-height controls that wraps evenly on smaller screens. */
.ad-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.ad-filterbar > * { flex: 1 1 200px; min-width: 0; }
.ad-filterbar > .ad-search { flex: 1.4 1 240px; }
.ad-filterbar > .ad-pillselect--date { flex: 1 1 190px; }
.ad-filterbar__note { flex-basis: 100% !important; color: var(--faint); font-size: 12px; margin: -2px 0 0 6px; }
.ad-f-custom { display: contents; }
.ad-pillselect--date {
	display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 16px; border-radius: 999px; min-width: 0;
	background: var(--panel); border: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; font-weight: 500;
}
.ad-pillselect--date:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-app .ad-pillselect--date input[type="date"] { flex: 1; min-width: 0; border: 0; outline: none; box-shadow: none; background: transparent; color: var(--text); height: 40px; font-weight: 500; padding: 0; }

/* ---------- Dropdowns (searchable, single choice or multi-select) ---------- */
.ad-dd { position: relative; display: block; min-width: 0; }
.ad-app .ad-dd__native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; padding: 0; border: 0; }
.ad-dd__btn {
	display: flex; align-items: center; gap: 9px; width: 100%; height: 44px; padding: 0 12px 0 16px;
	border: 1px solid var(--line-strong); background: var(--panel); border-radius: 999px; cursor: pointer;
	font-size: 14px; font-weight: 500; color: var(--text); text-align: left; transition: border-color .15s, box-shadow .15s;
}
.ad-dd__btn:hover { border-color: var(--field-hover); }
.ad-dd__btn.is-open, .ad-dd__btn:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.ad-dd__btn:disabled { opacity: .55; cursor: not-allowed; }
.ad-dd__btn > .ad-icon { width: 18px; height: 18px; color: var(--muted); }
.ad-dd__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-dd__text.is-muted { color: var(--text-3); }
.ad-dd__count {
	display: inline-flex; align-items: center; gap: 3px; flex: none; background: var(--ink); color: var(--on-ink);
	border-radius: 999px; padding: 2px 5px 2px 9px; font-size: 12px; font-weight: 600; line-height: 18px;
}
.ad-dd__count .ad-icon { width: 13px; height: 13px; stroke-width: 2.2; }
.ad-dd__count:hover { background: var(--ink-hover); }
.ad-dd__chev { display: inline-flex; flex: none; }
.ad-dd__chev .ad-icon { width: 17px; height: 17px; color: var(--muted); transition: transform .15s; }
.ad-dd__btn.is-open .ad-dd__chev .ad-icon { transform: rotate(180deg); }
.ad-dd--field .ad-dd__btn { height: 42px; border-radius: 11px; padding-left: 12px; }
.ad-dd--mini .ad-dd__btn { height: 34px; border-radius: 9px; padding: 0 6px 0 10px; min-width: 72px; font-weight: 600; }

.ad-dd__panel {
	position: fixed; z-index: 70; display: flex; flex-direction: column; padding: 6px;
	max-width: min(360px, calc(100vw - 16px)); background: var(--panel); border: 1px solid var(--line);
	border-radius: 14px; box-shadow: var(--shadow-lg);
	animation: ad-pop .12s ease;
}
.ad-dd__search { display: flex; align-items: center; gap: 8px; margin: 2px 2px 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; }
.ad-dd__search:focus-within { border-color: var(--accent); }
.ad-dd__search .ad-icon { width: 16px; height: 16px; color: var(--muted); }
.ad-app .ad-dd__search input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; box-shadow: none; background: transparent; font-size: 13.5px; padding: 0; }
.ad-dd__list { max-height: 286px; overflow-y: auto; overscroll-behavior: contain; }
.ad-dd__opt {
	display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; cursor: pointer;
	padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; font-weight: 450; color: var(--text); line-height: 1.35;
}
.ad-dd__opt:hover, .ad-dd__opt:focus-visible { background: var(--soft); outline: none; }
.ad-dd__opt.is-on .ad-dd__label { font-weight: 600; }
.ad-dd__opt[hidden] { display: none; }
.ad-dd__label { flex: 1; min-width: 0; }
.ad-dd__tick { display: inline-flex; color: var(--accent); }
.ad-dd__tick .ad-icon { width: 17px; height: 17px; stroke-width: 2.4; }
.ad-dd__box {
	width: 18px; height: 18px; flex: none; display: grid; place-items: center;
	border: 1.5px solid var(--check-border); border-radius: 5px; background: var(--panel); color: transparent; transition: background .1s, border-color .1s;
}
.ad-dd__box .ad-icon { width: 13px; height: 13px; stroke-width: 2.8; }
.ad-dd__opt.is-on .ad-dd__box, .ad-dd__all.is-some .ad-dd__box { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ad-dd__all { font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.ad-dd__sep { height: 1px; background: var(--line); margin: 4px 8px; }
.ad-dd__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 9px 8px 3px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ad-dd__empty { padding: 16px 10px; text-align: center; color: var(--muted); font-size: 13px; }

/* Chips for the chosen filter values */
.ad-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.ad-chips:empty { display: none; }
.ad-fchip {
	display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px 0 12px; cursor: pointer;
	border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); font-size: 12.5px; color: var(--muted);
}
.ad-fchip strong { color: var(--text); font-weight: 600; }
.ad-fchip .ad-icon { width: 14px; height: 14px; }
.ad-fchip:hover { border-color: var(--bad-line); background: var(--bad-soft); }
.ad-fchip:hover .ad-icon { color: var(--bad); }
.ad-chips__clear { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0 6px; }
.ad-chips__clear:hover { text-decoration: underline; }

@media (max-width: 700px) {
	.ad-filterbar > .ad-search { flex-basis: 100%; }
}

/* ---------- Cards ---------- */
.ad-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }

.ad-herocard {
	position: relative; overflow: hidden;
	border-radius: var(--radius); padding: 24px 26px;
	background: var(--hero-grad);
	border: 1px solid var(--hero-line);
	display: flex; flex-direction: column; min-height: 280px;
}
.ad-herocard__value { font-size: 40px; font-weight: 700; letter-spacing: -.025em; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.ad-herocard__meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.ad-breakdown { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 20px 0 0; }
.ad-breakdown dt { font-size: 12px; color: var(--muted); }
.ad-breakdown dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-herocard__chart { margin: auto 0 -6px; padding-top: 22px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.ad-herocard__chart .ad-cchart { height: 160px; }
.ad-herocard__caption { align-self: flex-start; margin-left: 50px; font-size: 11.5px; font-weight: 500; color: var(--muted); }

/* Collections chart: ₹ axis on the left, months along the bottom, hover for figures */
.ad-cchart { display: grid; grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 22px; height: 100%; }
.ad-cchart__y { position: relative; }
.ad-cchart__y span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-cchart__plot { position: relative; min-height: 0; }
.ad-cchart__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.ad-cchart__x { grid-column: 2; position: relative; }
.ad-cchart__x span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.ad-cchart__x span.is-now { color: var(--text); font-weight: 700; }
.ad-cchart__hit { position: absolute; top: 0; bottom: 0; cursor: default; }
.ad-cchart__hit:hover { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 8%, transparent)); }
.ad-cchart__dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--panel); border: 2.5px solid var(--accent); opacity: 0; transition: opacity .12s; }
.ad-cchart__tip {
	position: absolute; transform: translate(-50%, calc(-100% - 12px)); z-index: 2; pointer-events: none;
	background: var(--ink); color: var(--on-ink); font-size: 11.5px; font-weight: 500; line-height: 1.35; white-space: nowrap;
	padding: 6px 10px; border-radius: 9px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s;
}
.ad-cchart__tip strong { font-size: 13px; }
.ad-cchart__tip.is-left { transform: translate(-90%, calc(-100% - 12px)); }
.ad-cchart__tip.is-right { transform: translate(-10%, calc(-100% - 12px)); }
.ad-cchart__hit:hover .ad-cchart__dot, .ad-cchart__hit:hover .ad-cchart__tip { opacity: 1; }
@media (max-width: 560px) {
	.ad-cchart__x span:nth-child(even) { display: none; }
}

.ad-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ad-stat {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.ad-stat__top { display: flex; align-items: center; gap: 10px; }
.ad-stat__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--soft); color: var(--text); }
.ad-stat__icon .ad-icon { width: 18px; height: 18px; }
.ad-stat__label { color: var(--muted); font-weight: 500; font-size: 14px; }
.ad-stat__value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-stat__foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.ad-stat--good .ad-stat__icon { background: var(--good-soft); color: var(--good); }
.ad-stat--bad .ad-stat__icon { background: var(--bad-soft); color: var(--bad); }
.ad-stat--bad .ad-stat__value { color: var(--bad); }

/* ---------- Panels ---------- */
.ad-panel {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0;
}
.ad-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.ad-panel__head h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.ad-panel__head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ad-panel--table { padding: 0; overflow: hidden; }
.ad-pad { padding: 20px 24px; margin: 0; }
.ad-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ad-row--chart { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.ad-row > .ad-panel { margin-bottom: 18px; }
.ad-count { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; }
.ad-count--bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Charts ---------- */
.ad-legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.ad-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ad-legend--row { margin: -4px 0 8px; }
.ad-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.ad-dot--s { background: var(--bar-s); }
.ad-dot--r { background: var(--accent); }

.ad-chartscroll { overflow-x: auto; }
.ad-bars { width: 100%; height: auto; display: block; min-width: 520px; }
.ad-grid { stroke: var(--grid); stroke-width: 1; }
.ad-axis { fill: var(--faint); font-size: 11px; }
.ad-axis.is-now { fill: var(--text); font-weight: 700; }
.ad-bar-s { fill: var(--bar-s); }
.ad-bar-r { fill: var(--accent); }
.ad-bar-s.is-future { fill: var(--bar-s-future); }
.ad-bars rect:hover { opacity: .8; }

.ad-donutwrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ad-donut { width: 164px; height: 164px; flex: none; }
.ad-donut__track { fill: none; stroke: var(--soft); stroke-width: 20; }
.ad-donut__seg { fill: none; stroke-width: 20; transform: rotate(-90deg); transform-origin: 90px 90px; }
.ad-donut__num { font-size: 34px; font-weight: 700; fill: var(--text); }
.ad-donut__lbl { font-size: 12px; fill: var(--muted); }
.ad-statuslist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 210px; }
.ad-statuslist li { display: grid; grid-template-columns: 10px 1fr auto 28px; column-gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.ad-statuslist li:last-child { border-bottom: 0; }
.ad-statuslist strong { text-align: right; }
.ad-statuslist em { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.ad-seg--paid { stroke: var(--good); background: var(--good); }
.ad-seg--partial { stroke: #f0a63a; background: #f0a63a; }
.ad-seg--unpaid { stroke: #8ab0ec; background: #8ab0ec; }
.ad-seg--overdue { stroke: var(--bad); background: var(--bad); }
.ad-seg--partover { stroke: var(--orange); background: var(--orange); }

/* ---------- Due lists ---------- */
.ad-duelist { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; }
.ad-due { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.ad-due:last-child { border-bottom: 0; }
.ad-due__icon { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.ad-due__icon.is-bad { background: var(--bad-soft); color: var(--bad); }
.ad-due__main, .ad-due__side { display: flex; flex-direction: column; min-width: 0; }
.ad-due__main { flex: 1; }
.ad-due__main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-due__side { text-align: right; flex: none; }
.ad-due span { color: var(--muted); font-size: 12.5px; }
.ad-due__side strong { font-variant-numeric: tabular-nums; }
.ad-due--none { color: var(--muted); justify-content: center; gap: 8px; padding: 26px 0; }
.ad-due--none .ad-icon { color: var(--good); }

/* ---------- Tables ---------- */
.ad-tablebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.ad-search {
	display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
	border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); min-width: 240px;
}
.ad-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-search .ad-icon { width: 18px; height: 18px; color: var(--muted); }
.ad-search input { border: 0; outline: none; background: transparent; box-shadow: none; height: 38px; width: 100%; min-width: 0; }

.ad-tablewrap { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ad-table th, .ad-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ad-table th:first-child, .ad-table td:first-child { padding-left: 24px; }
.ad-table th:last-child, .ad-table td:last-child { padding-right: 24px; }
.ad-table thead th {
	color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
	background: var(--subtle); white-space: nowrap;
}
.ad-table th.is-sortable { cursor: pointer; user-select: none; }
.ad-table th.is-sortable:hover, .ad-table th.is-sorted { color: var(--text); }
.ad-table th .ad-icon { width: 14px; height: 14px; vertical-align: -2px; opacity: .55; }
.ad-table tbody tr { transition: background .12s; }
.ad-table tbody tr:hover { background: var(--hover); }
.ad-table tfoot th { border-bottom: 0; background: var(--subtle); font-weight: 650; }
.ad-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-table--kv th { width: 45%; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 14px; background: none; }
.ad-table--kv th:first-child, .ad-table--kv td:first-child { padding-left: 0; }
.ad-table--kv td:last-child { padding-right: 0; }
.ad-table code { background: var(--soft); padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }

.ad-progress { display: flex; align-items: center; gap: 10px; }
.ad-progress small { color: var(--muted); min-width: 34px; }
.ad-bar { height: 6px; width: 90px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.ad-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- Segmented tabs (pill style with counts) ---------- */
.ad-segtabs { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.ad-segtabs--page { margin-bottom: 20px; }
.ad-segtab {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
	border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel);
	font-weight: 550; color: var(--text-2); cursor: pointer; text-transform: capitalize;
}
.ad-segtab:hover { background: var(--soft); }
.ad-segtab.is-active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ad-segtab__count { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.ad-segtab.is-active .ad-segtab__count { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: var(--on-ink); }

/* ---------- Tags, badges, chips ---------- */
.ad-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--text-2); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.ad-tag--good { background: var(--good-soft); color: var(--good); }
.ad-tag--warn { background: var(--warn-soft); color: var(--warn); }
.ad-tag--bad { background: var(--bad-soft); color: var(--bad); }
.ad-tag--accent { background: var(--accent-soft); color: var(--accent); }
.ad-tags { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }

.ad-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ad-badge--paid { background: var(--good-soft); color: var(--good); }
.ad-badge--partial { background: var(--warn-soft); color: var(--warn); }
.ad-badge--unpaid { background: var(--info-soft); color: var(--info); }
.ad-badge--overdue { background: var(--bad-soft); color: var(--bad); }
.ad-badge--partover { background: var(--orange-soft); color: var(--orange); }

.ad-chip {
	--chip: #dfe3ea;
	display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
	background: color-mix(in srgb, var(--chip) 30%, var(--panel)); border: 1px solid color-mix(in srgb, var(--chip) 70%, var(--panel)); color: var(--text);
}

/* ---------- Settings ---------- */
.ad-tree__row { display: grid; grid-template-columns: 260px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ad-tree__row:last-child { border-bottom: 0; }
.ad-tree__parent { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* ---------- Messages & empty states ---------- */
.ad-alert { display: flex; align-items: flex-start; gap: 10px; background: var(--info-soft); color: var(--info-text); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: 13.5px; }
.ad-alert .ad-icon { width: 18px; height: 18px; margin-top: 1px; }
.ad-alert--warn { background: var(--warn-soft); color: var(--warn-text); margin: 14px 0 0; }
.ad-alert--error { background: var(--bad-soft); color: var(--bad); }
.ad-empty {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 48px 32px; max-width: 640px; margin: 12px auto; text-align: center; box-shadow: var(--shadow);
}
.ad-empty__icon { width: 56px; height: 56px; border-radius: 18px; background: var(--soft); display: grid; place-items: center; margin: 0 auto 16px; }
.ad-empty__icon .ad-icon { width: 26px; height: 26px; }
.ad-empty h2 { font-size: 20px; margin: 12px 0 8px; }
.ad-empty p { color: var(--muted); }
.ad-empty ul { text-align: left; list-style: none; padding: 0; margin: 18px auto 0; display: inline-flex; flex-direction: column; gap: 10px; color: var(--text-2); }
.ad-empty li { display: flex; gap: 10px; align-items: flex-start; }
.ad-empty li .ad-icon { color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.ad-muted { color: var(--muted); }
.ad-text-bad { color: var(--bad) !important; }

/* ---------- Buttons (extra sizes / tones) ---------- */
.ad-btn--sm { height: 34px; padding: 0 13px; font-size: 13px; }
.ad-btn--danger { background: var(--bad-strong); border-color: var(--bad-strong); color: #fff !important; }
.ad-btn--danger:hover { background: var(--bad-strong-hover); }
.ad-btn--danger:disabled { opacity: .45; cursor: not-allowed; }
.ad-btn--ghost-danger { color: var(--bad) !important; border-color: var(--bad-line); }
.ad-btn--ghost-danger:hover { background: var(--bad-soft); }
.ad-btn:disabled { opacity: .5; cursor: not-allowed; }
.ad-iconbtn--sm { width: 32px; height: 32px; border-radius: 10px; }
.ad-iconbtn--sm .ad-icon { width: 17px; height: 17px; }
.ad-linkbtn { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0 0 0 6px; font-size: 12.5px; }
.ad-linkbtn:hover { text-decoration: underline; }
.ad-chipbtn { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.ad-chipbtn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ad-spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: ad-spin .7s linear infinite; }
@keyframes ad-spin { to { transform: rotate(360deg); } }

/* ---------- Pop-up windows and side panel ---------- */
.ad-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ad-modal__backdrop { position: absolute; inset: 0; background: var(--overlay); animation: ad-fade .15s ease; }
.ad-modal__box {
	position: relative; background: var(--panel); border-radius: 20px; box-shadow: var(--shadow-lg);
	width: 100%; max-width: 620px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: ad-pop .18s ease;
}
.ad-modal__box.is-wide { max-width: 940px; }
.ad-modal__box.is-small { max-width: 460px; }
.ad-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ad-modal__head h2 { font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-modal__body { padding: 20px 22px; overflow-y: auto; }
.ad-modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--hover); border-radius: 0 0 20px 20px; }
.ad-modal--side { justify-content: flex-end; padding: 0; }
.ad-modal--side .ad-modal__box { max-width: 780px; height: 100%; max-height: none; border-radius: 0; animation: ad-slide .2s ease; }
.ad-modal--side .ad-modal__box.is-wide { max-width: min(1120px, 94vw); }
.ad-filterbar--panel { margin: 12px 0 14px; }
.ad-filterbar--panel > * { flex: 1 1 140px; }
.ad-filterbar--panel > .ad-search { flex: 1.3 1 180px; }
.ad-modal--side .ad-modal__foot { border-radius: 0; }
@keyframes ad-fade { from { opacity: 0; } }
@keyframes ad-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes ad-slide { from { transform: translateX(40px); opacity: .4; } }
.ad-confirm { margin: 0 0 6px; line-height: 1.6; }

/* ---------- Forms ---------- */
.ad-form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.ad-form legend { font-weight: 650; font-size: 14.5px; margin-bottom: 10px; padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ad-form legend .ad-muted { font-weight: 400; font-size: 12.5px; }
.ad-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ad-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.ad-input { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.ad-input > span { font-size: 12.5px; font-weight: 600; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; }
.ad-app .ad-input input, .ad-app .ad-input select, .ad-app .ad-input textarea, .ad-app .ad-cellinput, .ad-app .ad-num {
	width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel);
	font-size: 14px; color: var(--text); box-shadow: none; min-width: 0; max-width: none; margin: 0;
}
.ad-app .ad-input textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.ad-app .ad-input input:focus, .ad-app .ad-input select:focus, .ad-app .ad-input textarea:focus, .ad-app .ad-cellinput:focus, .ad-app .ad-num:focus {
	border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.ad-app .ad-num { height: 36px; text-align: right; max-width: 150px; margin-left: auto; display: block; }
.ad-formerror { display: flex; gap: 10px; align-items: flex-start; background: var(--bad-soft); color: var(--bad-text); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.55; }
.ad-formerror[hidden] { display: none; }
.ad-formerror .ad-icon { width: 18px; height: 18px; margin-top: 1px; }

.ad-dealcalc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ad-calcbox { background: var(--hero-grad); border: 1px solid var(--hero-line); border-radius: 14px; padding: 12px 16px; }
.ad-calcbox div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; color: var(--text-2); }
.ad-calcbox strong { font-variant-numeric: tabular-nums; }
.ad-calcbox .is-net { border-top: 1px dashed var(--hero-line); margin-top: 4px; padding-top: 9px; font-size: 15px; color: var(--text); }
.ad-calcbox .is-net strong { font-size: 19px; color: var(--good); }

.ad-splits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.ad-schedrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 12px; align-items: end; margin-bottom: 10px; }
.ad-schedrow__n { width: 30px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-weight: 700; color: var(--muted); }
.ad-schedfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.ad-schedfoot .ad-icon { width: 16px; height: 16px; vertical-align: -3px; }

.ad-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.ad-app .ad-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.ad-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); position: relative; }
.ad-app .ad-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-switch span { width: 36px; height: 20px; border-radius: 99px; background: var(--switch-off); position: relative; transition: background .15s; }
.ad-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ad-switch input:checked + span { background: var(--good); }
.ad-switch input:checked + span::after { transform: translateX(16px); }
.ad-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Toast messages ---------- */
.ad-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.ad-toast { display: flex; align-items: flex-start; gap: 10px; background: var(--ink); color: var(--on-ink); padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 32px rgba(17, 24, 39, .25); font-size: 13.5px; animation: ad-pop .2s ease; transition: opacity .3s, transform .3s; }
.ad-toast .ad-icon { color: var(--accent); width: 18px; height: 18px; }
.ad-toast--bad { background: #9b1c13; color: #fff; }
.ad-toast--bad .ad-icon { color: #fff; }
.ad-toast.is-leaving { opacity: 0; transform: translateY(6px); }

/* ---------- Tables: clickable rows, compact, pager ---------- */
.ad-table--rows tbody tr { cursor: pointer; }
.ad-table--rows th, .ad-table--rows td { padding: 12px 10px; white-space: nowrap; }
.ad-table--rows .ad-cell2 { white-space: normal; min-width: 150px; }
.ad-table--rows .ad-chip { font-size: 11.5px; padding: 3px 10px; white-space: nowrap; }
.ad-table--rows tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ad-table--compact th, .ad-table--compact td { padding: 9px 12px; }
.ad-table--compact th:first-child, .ad-table--compact td:first-child { padding-left: 12px; }
.ad-table--compact th:last-child, .ad-table--compact td:last-child { padding-right: 12px; }
.ad-table tr.is-void td { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--faint); }
.ad-table tr.is-void td .ad-badge, .ad-table tr.is-void td button { text-decoration: none; }
.ad-table--edit td { padding-top: 8px; padding-bottom: 8px; }
.ad-table--edit tr.is-hidden .ad-cellinput { color: var(--faint); }
.ad-app .ad-cellinput { height: 38px; }
.ad-app .ad-colorinput { width: 46px; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 2px; background: var(--panel); cursor: pointer; }
.ad-cell2 { display: flex; flex-direction: column; line-height: 1.35; }
.ad-cell2 span { color: var(--muted); font-size: 12.5px; }
.ad-rowactions { white-space: nowrap; text-align: right; }
.ad-rowactions .ad-iconbtn { display: inline-grid; margin-left: 4px; }
.ad-small { font-size: 12px; }
.ad-center { text-align: center; padding: 28px 16px !important; }
.ad-right { text-align: right; }
.ad-text-good { color: var(--good) !important; }
.ad-text-warn { color: var(--warn) !important; }
.ad-dealchip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; cursor: pointer; }
.ad-dealchip span { color: var(--muted); font-weight: 500; }
.ad-dealchip:hover { border-color: var(--accent); color: var(--accent); }

.ad-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); font-size: 13px; }
.ad-pager__per { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-left: auto; }
.ad-app .ad-pager__per select { height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 26px 0 10px; background-color: var(--panel); min-width: 0; }
.ad-pager__nums { display: inline-flex; gap: 4px; }
.ad-pager__num { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; display: inline-grid; place-items: center; padding: 0 6px; }
.ad-pager__num .ad-icon { width: 16px; height: 16px; }
.ad-pager__num.is-active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ad-pager__num:disabled { opacity: .4; cursor: default; }
.ad-pager__gap { padding: 0 4px; color: var(--muted); align-self: center; }
.ad-search--grow { min-width: 0; }
.ad-segtabs--sub { margin-bottom: 16px; }

/* ---------- Deal details panel ---------- */
.ad-dealhead h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.ad-dealhead p { margin: 4px 0 0; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-dealactions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.ad-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 20px; }
.ad-minis div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ad-minis span { font-size: 12px; color: var(--muted); }
.ad-minis strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.ad-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ad-modal__body h4 { font-size: 14px; font-weight: 650; margin: 22px 0 10px; display: flex; align-items: center; gap: 6px; }
.ad-modal__body h4 .ad-icon { width: 17px; height: 17px; color: var(--muted); }
.ad-split h4 { margin-top: 0; }
.ad-kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ad-kv th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 0; }
.ad-kv td { text-align: right; padding: 6px 0; font-variant-numeric: tabular-nums; }
.ad-kv tr.is-total th, .ad-kv tr.is-total td { border-top: 1px solid var(--line); font-weight: 700; color: var(--text); padding-top: 9px; }
.ad-note { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin: 0; white-space: pre-wrap; }
.ad-history { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.ad-history > li { margin: 0 0 12px; padding-left: 14px; position: relative; font-size: 13.5px; }
.ad-history > li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.ad-history ul { list-style: none; margin: 4px 0 0; padding: 0; color: var(--text-3); font-size: 13px; }
.ad-history ul li { margin: 2px 0; }
.ad-alert--lead { padding: 16px 20px; font-size: 15px; line-height: 1.55; border: 1px solid currentColor; border-left-width: 5px; margin-bottom: 20px; }
.ad-alert--lead .ad-icon { width: 24px; height: 24px; margin-top: 0; flex: none; }
.ad-alert--lead strong { display: block; font-size: 16px; margin-bottom: 2px; }
.ad-alert--compact { margin: 10px 0 0; padding: 9px 12px; font-size: 13px; }

/* ---------- Payment form ---------- */
.ad-allocsum { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; margin-top: 12px; padding: 12px 14px; background: var(--soft); border-radius: 12px; font-size: 13.5px; }
.ad-allocsum .ad-icon { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Import ---------- */
.ad-row--import { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ad-drop {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; position: relative;
	border: 2px dashed var(--line-strong); border-radius: 16px; padding: 36px 20px; cursor: pointer; background: var(--hover); margin-bottom: 14px;
	transition: border-color .15s, background .15s;
}
.ad-drop:hover, .ad-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.ad-drop .ad-icon { width: 34px; height: 34px; color: var(--accent); }
.ad-drop span { color: var(--muted); font-size: 13px; }
.ad-drop em { font-style: normal; font-weight: 600; color: var(--text); margin-top: 6px; }
.ad-app .ad-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ad-help ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.ad-help li { margin-bottom: 6px; }
.ad-importstats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ad-importstats div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.ad-importstats span { font-size: 12px; color: var(--muted); }
.ad-importstats strong { font-size: 22px; }
.ad-importstats .is-good { background: var(--good-soft); }
.ad-importstats .is-warn { background: var(--warn-soft); }
.ad-importstats .is-info { background: var(--info-soft); }
.ad-importstats .is-bad { background: var(--bad-soft); }
.ad-importgo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ad-msgs { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--text-3); min-width: 260px; }
.ad-msgs li { margin: 1px 0; }
.ad-ul { margin: 6px 0 0; padding-left: 18px; }
.ad-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px !important; }
.ad-empty--flat { box-shadow: none; border: 0; margin: 0 auto; }
.ad-empty__icon--good { background: var(--good-soft); color: var(--good); }
.ad-due--link { cursor: pointer; border-radius: 12px; }
.ad-due--link:hover { background: var(--hover); }
.ad-due--link:focus-visible { outline: 2px solid var(--accent); }
.ad-statuslist a { color: var(--text) !important; }
.ad-statuslist a:hover { text-decoration: underline; }

@media (max-width: 900px) {
	.ad-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ad-dealcalc, .ad-split, .ad-row--import { grid-template-columns: 1fr; }
	.ad-importstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ad-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ad-modal { padding: 0; align-items: flex-end; }
	.ad-modal__box { max-height: 94vh; border-radius: 20px 20px 0 0; }
	.ad-modal__foot { border-radius: 0; }
	.ad-modal--side .ad-modal__box, .ad-modal--side .ad-modal__box.is-wide { max-width: none; }
}
@media (max-width: 560px) {
	.ad-grid2, .ad-grid3 { grid-template-columns: 1fr; }
	.ad-schedrow { grid-template-columns: 26px minmax(0, 1fr) 32px; }
	.ad-schedrow > .ad-input:nth-of-type(2) { grid-column: 2 / 3; }
	.ad-pager { padding: 12px 16px; }
	.ad-pager__per { margin-left: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.ad-hero { grid-template-columns: 1fr; }
	.ad-row--chart { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
	.ad-row { grid-template-columns: 1fr; }
	.ad-breakdown > div { flex: 1 1 40%; }
}
@media (max-width: 900px) {
	/* Sidebar becomes a slide-out menu; "collapsed" doesn't apply on phones. */
	.ad-side, .ad-collapsed .ad-side {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; width: var(--side-w);
		padding: 22px 16px 18px; transform: translateX(-100%); transition: transform .22s ease;
		box-shadow: 0 10px 40px rgba(17, 24, 39, .18);
	}
	.ad-collapsed .ad-side__head { flex-direction: row; padding: 0 6px 26px; }
	.ad-collapsed .ad-logo img { width: auto; object-fit: contain; }
	.ad-collapsed .ad-side__caption { visibility: visible; height: auto; padding: 0 14px 10px; }
	.ad-collapsed .ad-nav__label { display: inline; }
	.ad-collapsed .ad-nav__item { justify-content: flex-start; padding: 0 14px; }
	.ad-collapsed .ad-side__toggle .ad-icon { transform: none; }
	.ad-menu-open .ad-side { transform: none; }
	.ad-menu-open .ad-scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 19; }
	.ad-iconbtn.ad-top__menu { display: grid; }
	.ad-top { padding: 0 16px; height: 64px; }
	.ad-crumb, .ad-user__text { display: none; }
	.ad-page { padding: 20px 16px 48px; }
	.ad-pagehead h1 { font-size: 26px; }
	.ad-tree__row { grid-template-columns: 1fr; }
	.ad-search { min-width: 0; flex: 1; }
	.ad-tablebar { padding: 16px; }
}
@media (max-width: 560px) {
	.ad-stats { grid-template-columns: 1fr; }
	.ad-herocard { padding: 20px; min-height: 300px; }
	.ad-herocard__value { font-size: 32px; }
	.ad-today { display: none; }
	.ad-panel { padding: 18px; }
	.ad-herocard__chart { margin: auto -20px -20px; }
	.ad-donutwrap { justify-content: center; }
	.ad-due { flex-wrap: wrap; }
	.ad-due__main { flex: 1 1 calc(100% - 60px); }
	.ad-due__side { text-align: left; margin-left: 56px; flex-direction: row; gap: 10px; align-items: baseline; flex-wrap: wrap; }
}

/* ---------- WordPress admin screens (Accounts menu) ----------
 * Only loaded on the plugin's own admin screens. Keeps WordPress's native
 * look and adds status pills, summary boxes and number alignment.
 */
.ad-admin .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-admin .ad-table-admin { margin-top: 8px; }
.ad-admin .ad-table-admin td, .ad-admin .ad-table-admin th { vertical-align: middle; }
.ad-admin h2 { margin-top: 28px; }
.ad-admin h2 .count { color: #646970; font-weight: 400; }
.ad-admin .notice ul.ad-list { list-style: disc; margin: 0 0 10px 22px; }
.ad-admin .ad-text-bad { color: #b32d2e; font-weight: 600; }

.ad-pill {
	display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid transparent;
	font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.8; white-space: nowrap;
}
.ad-pill--good { background: #e7f6ec; color: #116b3c; border-color: #b8e3c8; }
.ad-pill--warn { background: #fdf3e1; color: #8a5300; border-color: #f2d69c; }
.ad-pill--info { background: #e9f0fc; color: #2a5bb5; border-color: #c4d6f5; }
.ad-pill--bad { background: #fcebea; color: #b32d2e; border-color: #f2c1bf; }
.ad-pill--orange { background: #fdeee6; color: #b4470f; border-color: #f5c9b1; }
.ad-pill--grey { background: #f0f0f1; color: #50575e; border-color: #dcdcde; }

.ad-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 18px 0 8px; }
.ad-box { background: #fff; border: 1px solid #c3c4c7; border-left: 4px solid #2271b1; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.ad-box span { color: #50575e; font-size: 13px; }
.ad-box strong { font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ad-box small { color: #646970; }
.ad-box--good { border-left-color: #00a32a; }
.ad-box--warn { border-left-color: #dba617; }
.ad-box--bad { border-left-color: #d63638; }
.ad-box--bad strong { color: #b32d2e; }

.ad-statusline { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; }
.ad-statusline a { text-decoration: none; color: #1d2327; display: inline-flex; align-items: center; gap: 6px; }

.ad-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1200px) { .ad-cols { grid-template-columns: 1fr; } }

.ad-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .1); }
.ad-logo-preview { height: 48px; width: auto; }
.ad-admin .ad-mini { max-width: 520px; }
.ad-admin .ad-mini td { padding: 6px 10px; }
.ad-admin code.ad-details { font-size: 11px; word-break: break-all; }
.ad-admin .nav-tab-wrapper { margin-bottom: 4px; }
.ad-admin-card { background: #fff; border: 1px solid #c3c4c7; padding: 4px 20px 16px; margin: 16px 0; max-width: 900px; }
.ad-admin-card select { margin: 0 6px 6px 0; }
.ad-dotchip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--chip); margin: 0 4px 0 6px; vertical-align: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.ad-dealchip, .ad-table code { white-space: nowrap; }
.ad-filterbar .ad-search { height: 44px; }

/* ---------- Clickable dashboard figures ---------- */
.ad-stat--link { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ad-stat--link:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(17, 24, 39, .08); transform: translateY(-1px); }
.ad-stat--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-stat__more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity .15s; }
.ad-stat__more .ad-icon { width: 14px; height: 14px; }
.ad-stat--link:hover .ad-stat__more, .ad-stat--link:focus-visible .ad-stat__more { opacity: 1; }
.ad-taglink { border: 0; cursor: pointer; gap: 3px; font: inherit; font-size: 12.5px; font-weight: 600; }
.ad-taglink .ad-icon { width: 13px; height: 13px; }
.ad-taglink:hover { filter: brightness(.95); text-decoration: underline; }
.ad-minis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-minis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Payment ID links and payment panel ---------- */
.ad-codelink { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; border-bottom: 1px dashed var(--faint); line-height: 1.3; }
.ad-codelink:hover, .ad-codelink:focus-visible { color: var(--accent); border-bottom-color: var(--accent); outline: none; }
.ad-kv--left th { width: 38%; vertical-align: top; }
.ad-kv--left td { text-align: left; }

/* ---------- Dropdown list editor: one Save for everything ---------- */
.ad-tablebar__tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ad-listeditor .ad-tablebar p { flex: 1 1 320px; margin: 0; }
.ad-table--edit tbody tr { transition: background .15s; }
.ad-table--edit tbody tr.is-dirty { background: var(--dirty); box-shadow: inset 3px 0 0 #f0a63a; }
.ad-table--edit tbody tr.is-new { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ad-rowstate { display: none; font-size: 11.5px; font-weight: 600; color: var(--warn); margin-right: 10px; vertical-align: middle; }
.ad-table--edit tr.is-dirty .ad-rowstate { display: inline; }
.ad-table--edit tr.is-new .ad-rowstate { color: var(--accent); }
.ad-table--edit .ad-rowstate + .ad-iconbtn { display: inline-grid; vertical-align: middle; }
.ad-switch em { font-style: normal; }
.ad-savebar {
	position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
	padding: 12px 24px; background: var(--glass); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
	box-shadow: 0 -6px 16px rgba(17, 24, 39, .05);
}
.ad-savebar[hidden] { display: none; }
.ad-savebar > span { margin-right: auto; color: var(--warn); font-weight: 500; }
.ad-panel--table.ad-listeditor { overflow: visible; }
.ad-listeditor .ad-savebar { border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Users page ---------- */
.ad-person { display: flex; align-items: center; gap: 12px; }
.ad-avatar--sm { width: 34px; height: 34px; font-size: 12.5px; flex: none; }
.ad-permcell { white-space: normal !important; max-width: 420px; }
.ad-permcell .ad-tag { margin: 2px 2px 2px 0; font-size: 11.5px; }
.ad-tablebar--bare { padding: 0; border: 0; margin-bottom: 14px; }
.ad-actionlist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ad-actionitem {
	display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; cursor: pointer;
	border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font: inherit; color: var(--text);
}
.ad-actionitem:hover { background: var(--soft); }
.ad-actionitem .ad-icon { margin-top: 2px; color: var(--muted); }
.ad-actionitem span { display: flex; flex-direction: column; gap: 2px; }
.ad-actionitem small { color: var(--muted); font-size: 12.5px; }
.ad-actionitem.is-danger strong, .ad-actionitem.is-danger .ad-icon { color: var(--bad); }
.ad-permlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.ad-permitem { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; }
.ad-permitem:hover { background: var(--hover); }
.ad-permitem:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.ad-app .ad-permitem input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.ad-permitem span { display: flex; flex-direction: column; gap: 2px; }
.ad-permitem small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ad-check--block { display: flex; align-items: flex-start; margin-bottom: 16px; }
.ad-check--block input { margin-top: 3px !important; }
.ad-input--wide { max-width: 560px; }
@media (max-width: 700px) { .ad-permlist { grid-template-columns: 1fr; } }
#ad-u-table td.ad-rowactions { text-align: right; white-space: nowrap; }
#ad-u-table td.ad-rowactions > * { vertical-align: middle; margin-left: 6px; }

/* ---------- Log-in / sign-up page ---------- */
body.ad-auth-body {
	margin: 0; min-height: 100vh;
	background: var(--auth-bg);
}
.ad-auth {
	min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; box-sizing: border-box;
	color: var(--text); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased;
}
.ad-auth *, .ad-auth *::before, .ad-auth *::after { box-sizing: border-box; }
.ad-auth .ad-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ad-auth a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.ad-auth a:hover { text-decoration-color: var(--ink); }
.ad-auth__card {
	width: min(1080px, 100%); min-height: 660px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	background: var(--panel); border-radius: 30px; padding: 12px; box-shadow: 0 30px 80px rgba(17, 24, 39, .12), 0 2px 8px rgba(17, 24, 39, .05);
}

.ad-auth__brand {
	position: relative; overflow: hidden; border-radius: 22px; padding: 34px 34px 28px; color: #fff;
	display: flex; flex-direction: column; gap: 22px;
	background: radial-gradient(500px 340px at 85% 15%, rgba(193, 44, 73, .55), transparent 70%),
		radial-gradient(420px 320px at 10% 95%, rgba(20, 163, 139, .35), transparent 70%),
		linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #2a1630 100%);
}
.ad-auth__brand::after {
	content: ""; position: absolute; width: 420px; height: 420px; right: -160px; bottom: -170px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .02), 0 0 0 120px rgba(255, 255, 255, .015);
}
.ad-auth__logo { align-self: flex-start; line-height: 0; position: relative; z-index: 1; }
.ad-auth__logo img { height: 46px; width: auto; }
.ad-auth__pitch { margin-top: 18px; position: relative; z-index: 1; }
.ad-auth__pitch h2 { font-size: 44px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; margin: 0 0 14px; color: #fff; }
.ad-auth__pitch p { margin: 0; max-width: 330px; color: rgba(255, 255, 255, .72); font-size: 15px; }
.ad-auth__float {
	position: absolute; z-index: 1; background: var(--panel); color: var(--text); border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .28); padding: 14px 16px;
}
.ad-auth__float--a { right: 30px; top: 46%; width: 168px; }
.ad-auth__floatlabel { font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-auth__bars { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin-top: 10px; }
.ad-auth__bars i { flex: 1; border-radius: 5px; background: linear-gradient(180deg, #2fc2a4, #14a38b); }
.ad-auth__bars i:nth-child(odd) { background: var(--bar-s-future); }
.ad-auth__float--b { left: 34px; top: calc(46% + 70px); display: flex; gap: 12px; align-items: center; max-width: 250px; }
.ad-auth__float--b .ad-icon { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--good-soft); color: var(--good); }
.ad-auth__float--b div { display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.35; }
.ad-auth__float--b span { color: var(--muted); }
.ad-auth__points { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.ad-auth__points li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, .85); font-size: 14px; }
.ad-auth__points .ad-icon { color: #5fe0c4; }
.ad-auth__brand small { color: rgba(255, 255, 255, .45); font-size: 12px; position: relative; z-index: 1; }

.ad-auth__main { display: flex; flex-direction: column; padding: 26px 56px 22px; min-width: 0; }
.ad-auth__top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); min-height: 36px; }
.ad-auth__mobilelogo { display: none; margin-right: auto; line-height: 0; }
.ad-auth__mobilelogo img { height: 32px; }
.ad-auth__toplink { margin-left: auto; }
.ad-auth__body { width: 100%; max-width: 410px; margin: auto; padding: 28px 0; }
.ad-auth h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.ad-auth__sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.ad-auth__form { display: flex; flex-direction: column; }
.ad-auth__field { display: block; margin: 0 0 16px; }
.ad-auth__label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.ad-auth__input {
	display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px;
	background: var(--input-bg); border: 1px solid var(--input-line); border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.ad-auth__input:hover { border-color: var(--field-hover); }
.ad-auth__input:focus-within { background: var(--panel); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ad-auth__input > .ad-icon { color: var(--faint); }
.ad-auth__input input {
	flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; box-shadow: none;
	font: inherit; font-size: 15px; color: var(--text); padding: 0;
}
.ad-auth__input input::placeholder { color: var(--faint); }
.ad-auth__eye { border: 0; background: none; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); padding: 0; }
.ad-auth__eye:hover { background: var(--soft); color: var(--text); }
.ad-auth__eye:focus-visible { outline: 2px solid var(--accent); }
.ad-auth__eye .ad-icon + .ad-icon, .ad-auth__eye[aria-pressed="true"] .ad-icon:first-child { display: none; }
.ad-auth__eye[aria-pressed="true"] .ad-icon + .ad-icon { display: block; }
.ad-auth__rules { list-style: none; margin: -6px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--faint); }
.ad-auth__rules li { display: flex; align-items: center; gap: 7px; transition: color .15s; }
.ad-auth__rules .ad-icon { width: 15px; height: 15px; }
.ad-auth__rules li.is-ok { color: var(--good); }
.ad-auth__match { margin: -8px 0 16px; font-size: 13px; font-weight: 500; }
.ad-auth__match.is-ok { color: var(--good); }
.ad-auth__match.is-bad { color: var(--warn); }
.ad-auth__hint { margin: -8px 0 16px; font-size: 13px; color: var(--muted); }
.ad-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 22px; font-size: 14px; }
.ad-auth__check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }
.ad-auth__check input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }
.ad-auth__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; border: 0; cursor: pointer;
	border-radius: 999px; background: var(--ink); color: var(--on-ink) !important; font: inherit; font-size: 15.5px; font-weight: 600; text-decoration: none !important;
	box-shadow: 0 10px 24px rgba(17, 24, 39, .22); transition: transform .15s, box-shadow .15s, background .15s;
}
.ad-auth__btn:hover { background: var(--ink-hover); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(17, 24, 39, .26); }
.ad-auth__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ad-auth__btn .ad-icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.ad-auth__btn.is-busy { opacity: .7; cursor: progress; transform: none; }
.ad-auth__btn--ghost { background: var(--panel); color: var(--text) !important; border: 1px solid var(--line-strong); box-shadow: none; }
.ad-auth__btn--ghost:hover { background: var(--soft); }
.ad-auth__msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 0 0 18px; font-size: 14px; background: var(--info-soft); color: var(--info-text); }
.ad-auth__msg--bad { background: var(--bad-soft); color: var(--bad-text); }
.ad-auth__alt { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.ad-auth__done { text-align: center; }
.ad-auth__done p { color: var(--muted); margin: 0 0 26px; }
.ad-auth__done strong { color: var(--text); }
.ad-auth__doneicon { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); }
.ad-auth__doneicon .ad-icon { width: 32px; height: 32px; }
.ad-auth__trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.ad-auth__foot { text-align: center; color: var(--faint); font-size: 12px; margin: 0; }

@media (max-width: 920px) {
	.ad-auth { padding: 0; place-items: stretch; }
	.ad-auth__card { grid-template-columns: 1fr; min-height: 100vh; border-radius: 0; padding: 0; box-shadow: none; }
	.ad-auth__brand { display: none; }
	.ad-auth__mobilelogo { display: block; }
	.ad-auth__main { padding: 20px 22px; }
	.ad-auth__top { justify-content: space-between; font-size: 13px; }
	.ad-auth h1 { font-size: 28px; }
}
@media (max-width: 520px) {
	.ad-auth__top { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* ---------- Light / dark switch ---------- */
.ad-themebtn { position: relative; }
.ad-themebtn .ad-icon { width: 19px; height: 19px; }
html[data-theme="dark"] .ad-themebtn .ad-icon--moon, html[data-theme="dark"] .ad-themebtn > .ad-icon:first-child { display: none; }
html:not([data-theme="dark"]) .ad-themebtn .ad-icon--sun, html:not([data-theme="dark"]) .ad-themebtn > .ad-icon:last-child { display: none; }
.ad-auth .ad-themebtn {
	width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; cursor: pointer;
	border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); padding: 0;
}
.ad-auth .ad-themebtn:hover { background: var(--soft); }

/* ---------- Search (top bar, every page) ---------- */
.ad-gsearch { position: relative; flex: 1 1 auto; max-width: 520px; margin-left: 12px; }
.ad-gsearch__box {
	display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px 0 14px;
	background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; cursor: text;
	transition: border-color .15s, box-shadow .15s;
}
.ad-gsearch__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-gsearch__box .ad-icon { width: 18px; height: 18px; color: var(--muted); }
.ad-app .ad-gsearch__box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 40px; padding: 0; box-shadow: none; font-size: 14px; }
.ad-gsearch__box input::-webkit-search-cancel-button { cursor: pointer; }
.ad-gsearch__box kbd { font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 6px; background: var(--soft); white-space: nowrap; }
.ad-gsearch__box:focus-within kbd { display: none; }
.ad-gsearch__res {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; min-width: 340px;
	max-height: min(70vh, 560px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
	border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px;
}
.ad-gsearch__head { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.ad-gsearch__item {
	display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
	padding: 8px 10px; border-radius: 11px; color: var(--text); font: inherit;
}
.ad-gsearch__item.is-active, .ad-gsearch__item:hover { background: var(--soft); }
.ad-gsearch__item.is-void .ad-gsearch__main strong { text-decoration: line-through; text-decoration-color: var(--faint); }
.ad-gsearch__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex: none; }
.ad-gsearch__item.is-active .ad-gsearch__ic { background: var(--panel); color: var(--text); }
.ad-gsearch__ic .ad-icon { width: 17px; height: 17px; }
.ad-gsearch__main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.ad-gsearch__main strong { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-gsearch__main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-gsearch__side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 600; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-gsearch__side .ad-badge { font-size: 11px; padding: 2px 8px; }
.ad-gsearch mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.ad-gsearch__msg { padding: 18px 14px; color: var(--muted); text-align: center; font-size: 13.5px; }
.ad-gsearch__foot { border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 10px 4px; font-size: 11.5px; color: var(--faint); }
.ad-iconbtn.ad-top__searchbtn { display: none; }
@media (max-width: 1180px) {
	.ad-crumb { display: none; }
	.ad-gsearch { margin-left: 0; }
}
@media (max-width: 1020px) {
	.ad-today { display: none; }
}
@media (max-width: 700px) {
	.ad-gsearch { display: none; }
	.ad-iconbtn.ad-top__searchbtn { display: grid; }
	.ad-search-open .ad-gsearch {
		display: block; position: fixed; top: 10px; left: 12px; right: 12px; max-width: none; margin: 0; z-index: 40;
	}
	.ad-search-open .ad-gsearch__box { box-shadow: var(--shadow-lg); }
	.ad-gsearch__res { min-width: 0; }
	.ad-gsearch__box kbd { display: none; }
}

/* ---------- Activity log ---------- */
.ad-table--activity td { vertical-align: top; }
.ad-table--activity tr.ad-act__day td { background: var(--subtle); font-weight: 650; font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
.ad-act__day span { color: var(--muted); font-weight: 500; margin-left: 6px; }
.ad-table--activity tr.ad-act__day:hover { background: var(--subtle); }
.ad-act__time { color: var(--muted); font-variant-numeric: tabular-nums; width: 70px; white-space: nowrap; }
.ad-act { display: flex; gap: 12px; align-items: flex-start; white-space: normal; min-width: 280px; }
.ad-act__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--muted); }
.ad-act__icon .ad-icon { width: 16px; height: 16px; }
.ad-act__icon--deals { background: var(--info-soft); color: var(--info); }
.ad-act__icon--payments { background: var(--good-soft); color: var(--good); }
.ad-act__icon--users { background: var(--warn-soft); color: var(--warn); }
.ad-act__icon--system { background: var(--bad-soft); color: var(--bad); }
.ad-act__icon--files { background: var(--orange-soft); color: var(--orange); }
.ad-act__text { padding-top: 5px; line-height: 1.45; }
.ad-table--activity tr.is-bad .ad-act__text > div:first-child { color: var(--bad); font-weight: 600; }
.ad-changes { list-style: none; margin: 6px 0 2px; padding: 8px 12px; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; display: grid; gap: 3px; }
.ad-changes li span { color: var(--muted); }
.ad-changes li span::after { content: ":"; }
.ad-changes del { color: var(--faint); }
.ad-empty--flat { box-shadow: none; border: 0; margin: 0; }
.ad-admin .ad-changes { background: #f6f7f7; border-color: #dcdcde; }

/* ---------- Settings → Backup & data ---------- */
.ad-stats--data { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.ad-datacards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ad-datacard { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ad-datacard h2 { font-size: 16px; font-weight: 650; }
.ad-datacard p { color: var(--muted); font-size: 13.5px; line-height: 1.55; flex: 1; }
.ad-datacard p strong { color: var(--text); }
.ad-datacard .ad-btn { margin-top: 4px; cursor: pointer; }
.ad-datacard__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ad-datacard__icon--bad { background: var(--bad-soft); color: var(--bad); }
.ad-good { color: var(--good); display: flex; align-items: center; gap: 6px; flex: 0 !important; }
.ad-good .ad-icon { width: 16px; height: 16px; }
.ad-radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; margin-bottom: 10px; }
.ad-radio:has(input:checked) { border-color: var(--ink); background: var(--hover); }
.ad-app .ad-radio input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.ad-radio span { display: flex; flex-direction: column; gap: 2px; }
.ad-radio small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 1200px) {
	.ad-stats--data { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ad-datacards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.ad-stats--data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- My profile pop-up ---------- */
.ad-popwrap { position: fixed; inset: 0; z-index: 60; }
.ad-popwrap__bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--overlay) 45%, transparent); }
.ad-pop {
	position: absolute; top: 70px; right: 24px; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); overflow-y: auto;
	background: var(--bg); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 22px 18px 16px; outline: none;
	opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; transition: opacity .16s ease, transform .16s ease;
}
.ad-pop.is-open { opacity: 1; transform: none; }
.ad-pop__x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; }
.ad-pop__head { text-align: center; padding: 6px 0 16px; }
.ad-pop__avatar {
	width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center;
	background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--accent); font-size: 24px; font-weight: 700; letter-spacing: .02em;
}
.ad-pop__head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.ad-pop__head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ad-pop__card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.ad-pop__card h3 { font-size: 14.5px; font-weight: 650; margin: 0 0 6px; }
.ad-pop__cardhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ad-pop__cardhead h3 { margin: 0; }
.ad-pop__list { list-style: none; margin: 0; padding: 0; }
.ad-pop__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ad-pop__row:last-child { border-bottom: 0; padding-bottom: 2px; }
.ad-pop__ic { width: 22px; display: grid; place-items: center; color: var(--muted); flex: none; }
.ad-pop__ic .ad-icon { width: 19px; height: 19px; }
.ad-pop__rowtext { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.ad-pop__rowtext small { font-size: 11.5px; color: var(--muted); }
.ad-pop__rowtext > span { font-size: 14px; overflow-wrap: anywhere; }
.ad-pop__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ad-pop__recent { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 8px; }
.ad-pop__recent li { display: flex; flex-direction: column; font-size: 13px; line-height: 1.4; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.ad-pop__recent small { color: var(--muted); font-size: 11.5px; }
.ad-pop__form { margin-top: 8px; }
.ad-pop__form .ad-input { margin-bottom: 10px; }
.ad-pop__actions { display: flex; justify-content: flex-end; gap: 8px; }
.ad-pop__logout {
	display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 16px; margin: 4px 0 10px;
	background: var(--soft); color: var(--bad) !important; font-weight: 600; text-decoration: none;
}
.ad-pop__logout:hover { background: var(--bad-soft); }
.ad-pop__logout .ad-icon { width: 18px; height: 18px; }
.ad-pop__foot { text-align: center; color: var(--faint); font-size: 11.5px; }
.ad-linkbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent) !important; text-decoration: none; }
.ad-linkbtn:hover { background: var(--accent-soft); }
.ad-linkbtn .ad-icon { width: 15px; height: 15px; }
.ad-switch--lg span { width: 44px; height: 26px; }
.ad-switch--lg span::after { width: 22px; height: 22px; }
.ad-switch--lg input:checked + span::after { transform: translateX(18px); }
.ad-pwfield { position: relative; display: block; }
.ad-app .ad-pwfield input { padding-right: 44px; width: 100%; }
.ad-pwfield__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.ad-pwfield__eye:hover { background: var(--soft); color: var(--text); }
.ad-pwfield__eye .ad-icon { width: 18px; height: 18px; }
.ad-rules { list-style: none; margin: -2px 0 12px; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--faint); }
.ad-rules li { display: flex; align-items: center; gap: 7px; }
.ad-rules .ad-icon { width: 15px; height: 15px; }
.ad-rules li.is-ok { color: var(--good); }
@media (max-width: 560px) {
	.ad-pop { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-width: none; max-height: 88vh; border-radius: 24px 24px 0 0; transform-origin: bottom center; transform: translateY(16px); }
}

/* ---------- Upcoming payments by week / month / quarter ---------- */
.ad-segtabs--mini { gap: 4px; }
.ad-segtabs--mini .ad-segtab { height: 32px; padding: 0 12px; font-size: 13px; }
.ad-buckets { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ad-bucket {
	display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(60px, 1fr) auto; align-items: center; gap: 14px;
	width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text);
}
.ad-bucket:hover:not(:disabled), .ad-bucket:focus-visible { background: var(--hover); outline: none; }
.ad-bucket:disabled { cursor: default; opacity: .55; }
.ad-bucket__name, .ad-bucket__num { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ad-bucket__name small, .ad-bucket__num small { color: var(--muted); font-size: 12px; }
.ad-bucket__num { align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-bucket__bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.ad-bucket__bar i { display: block; height: 100%; border-radius: 99px; background: var(--warn); min-width: 0; }
.ad-calcbox .is-grand { font-weight: 650; border-bottom: 1px dashed var(--hero-line); padding-bottom: 8px; margin-bottom: 4px; }
.ad-calcbox .is-net small { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) {
	.ad-bucket { grid-template-columns: 1fr auto; }
	.ad-bucket__bar { display: none; }
}
.ad-nowrap { white-space: nowrap; }

/* Two-step log-in (authenticator set-up, backup codes) */
.ad-auth__steps { margin: 4px 0 10px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ad-auth__steps li { margin: 0 0 6px; }
.ad-auth__qr { display: flex; justify-content: center; margin: 4px 0 10px; }
.ad-auth__qr svg { width: 188px; height: 188px; border-radius: 10px; border: 1px solid var(--line); }
.ad-auth__key code { font-size: 13px; letter-spacing: .5px; word-spacing: 2px; user-select: all; }
.ad-auth__codes, .ad-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 12px 0 18px; padding: 14px 18px 14px 38px; border: 1px dashed var(--line); border-radius: 12px; font: 600 15px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .5px; user-select: all; }
