/* ============================================================
   Agency Hub — Client Portal  (matches reference UI design)
   ============================================================ */

/* ----------------------------------------------------------
   Full-page takeover — hide active theme chrome so our portal
   layout owns the whole viewport. Aggressive selectors cover
   OceanWP, Astra, GeneratePress, Storefront, and most others.
   ---------------------------------------------------------- */
body.agency-portal-page {
	background: #EAEAED !important;
	background-attachment: fixed !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow-x: hidden;
}
/* The admin bar is disabled in PHP on takeover pages (show_admin_bar filter in
   class-shortcodes.php), so WP never emits its `html { margin-top:32px }` bump —
   which was the real cause of the empty strip at the top of the Owner Console.
   Belt-and-braces hide in case the bar ever slips through. NOTE: portal.css is
   enqueued site-wide, so we must NOT touch `html` margins unscoped here, or the
   admin bar would overlap content on normal pages. The old `html.agency-portal-page`
   override was a dead no-op (the class lives on <body>, not <html>). */
body.agency-portal-page #wpadminbar { display: none !important; }

/* Hide theme header / nav / footer / titles */
body.agency-portal-page .site-header,
body.agency-portal-page header.site-header,
body.agency-portal-page #site-header,
body.agency-portal-page #masthead,
body.agency-portal-page .main-navigation,
body.agency-portal-page .ocean-header,
body.agency-portal-page #top-bar-wrap,
body.agency-portal-page #top-bar,
body.agency-portal-page .top-bar-wrap,
body.agency-portal-page #scroll-top,
body.agency-portal-page #side-panel-overlay,
body.agency-portal-page #site-navigation-wrap,
body.agency-portal-page #site-logo,
body.agency-portal-page .site-footer,
body.agency-portal-page footer.site-footer,
body.agency-portal-page #colophon,
body.agency-portal-page #footer,
body.agency-portal-page #footer-bottom,
body.agency-portal-page .footer-bottom,
body.agency-portal-page .footer-widgets,
body.agency-portal-page .entry-header,
body.agency-portal-page .page-header,
body.agency-portal-page #page-header,
body.agency-portal-page .page-header-title,
body.agency-portal-page .wp-block-post-title,
body.agency-portal-page .single-page-title,
body.agency-portal-page .ast-page-header,
body.agency-portal-page nav.menu-bar,
body.agency-portal-page .breadcrumbs,
body.agency-portal-page #breadcrumb,
body.agency-portal-page #secondary,
body.agency-portal-page aside#secondary,
body.agency-portal-page .widget-area,
body.agency-portal-page #sidebar,
body.agency-portal-page aside.sidebar,
body.agency-portal-page .sidebar-primary,
body.agency-portal-page .sidebar-secondary,
body.agency-portal-page #sidebar-primary,
body.agency-portal-page #sidebar-secondary,
body.agency-portal-page #sidebar-widgets-area,
body.agency-portal-page .sidebar-container,
body.agency-portal-page .wp-block-sidebar,
body.agency-portal-page .widget_search,
body.agency-portal-page .widget_recent_entries,
body.agency-portal-page .widget_recent_comments,
body.agency-portal-page .widget_categories,
body.agency-portal-page .widget_archive,
body.agency-portal-page .widget_meta,
body.agency-portal-page .widget_tag_cloud,
body.agency-portal-page .widget_block,
body.agency-portal-page .post-navigation,
body.agency-portal-page .nav-links,
body.agency-portal-page .comments-area,
body.agency-portal-page #comments,
body.agency-portal-page .related-posts,
body.agency-portal-page .ast-related-posts-wrapper { display: none !important; }

/* Reset theme containers to give us the full viewport */
body.agency-portal-page .site-content,
body.agency-portal-page #content-wrap,
body.agency-portal-page #content,
body.agency-portal-page .content-area,
body.agency-portal-page main.site-main,
body.agency-portal-page #main,
body.agency-portal-page #primary,
body.agency-portal-page .entry-content,
body.agency-portal-page article.page,
body.agency-portal-page #page,
body.agency-portal-page .container,
body.agency-portal-page .wp-site-blocks,
body.agency-portal-page .wp-block-group,
body.agency-portal-page .ocean-content-wrap,
body.agency-portal-page .clr,
body.agency-portal-page .entry-content > .entry,
body.agency-portal-page .entry {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	width: 100% !important;
	float: none !important;
	display: block !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* ----------------------------------------------------------
   Layout shell
   ---------------------------------------------------------- */
.ah-wrap {
	display: flex;
	min-height: 100vh;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
}
/* Defensive reset — some themes force `a { text-decoration: underline !important }`
   site-wide for accessibility; without this override every link in the portal
   (nav items, quick actions, quick links, buttons) shows an unwanted underline. */
.ah-wrap a { text-decoration: none !important; }

/* ----------------------------------------------------------
   Sidebar
   ---------------------------------------------------------- */
.ah-sidebar {
	width: 235px;
	min-width: 235px;
	background: #274566;
	display: flex;
	flex-direction: column;
	position: fixed;
	/* Offset below the view-as preview banner when present (set via JS to the
	   banner's real rendered height — see portal-layout.php) so the sidebar
	   doesn't render on top of and clip it. Zero on every normal page. */
	top: var(--ah-viewas-offset, 0px);
	left: 0;
	bottom: 0;
	z-index: 300;
	overflow-y: auto;
	overflow-x: hidden;
	transition: transform .25s ease;
}
.ah-sidebar::-webkit-scrollbar { width: 4px; }
.ah-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.ah-sidebar__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 16px 18px;
	border-bottom: 1px solid rgba(255,255,255,.06);
	flex-shrink: 0;
}

.ah-sidebar__logo-icon {
	width: 34px;
	height: 34px;
	background: #6683A1;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ah-sidebar__logo-icon svg { display: block; }

.ah-sidebar__logo-text {
	font-size: 14.5px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ah-nav { flex: 1; padding: 10px 10px 6px; }
/* Help & Guide pinned at the bottom of the nav, above the support box */
.ah-nav--pinned { flex: 0 0 auto; padding: 6px 10px 4px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }

.ah-nav__item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 12px;
	margin-bottom: 2px;
	border-radius: 8px;
	color: #8b95b5;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	transition: background .15s, color .15s;
}
.ah-nav__item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.ah-nav__item--active { background: rgba(255,255,255,.14); color: #fff !important; }
.ah-nav__item--active:hover { background: rgba(255,255,255,.18); }

.ah-nav__icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	opacity: .7;
}
.ah-nav__item--active .ah-nav__icon,
.ah-nav__item:hover .ah-nav__icon { opacity: 1; }
.ah-nav__icon svg { width: 18px; height: 18px; display: block; }

.ah-sidebar__bottom {
	padding: 12px 12px 16px;
	border-top: 1px solid rgba(255,255,255,.06);
	flex-shrink: 0;
}

.ah-sidebar__logout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	padding: 9px 12px;
	border-radius: 8px;
	color: #8b95b5;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.ah-sidebar__logout:hover { background: rgba(239,68,68,.12); color: #fca5a5; text-decoration: none; }

/* ----------------------------------------------------------
   Main area
   ---------------------------------------------------------- */
.ah-main {
	flex: 1;
	margin-left: 235px;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: #EAEAED;
}

.ah-topbar {
	background: transparent;
	border-bottom: none;
	padding: 20px 28px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 200;
	gap: 16px;
	box-shadow: none;
}

.ah-topbar__left { display: flex; align-items: center; gap: 12px; }

.ah-topbar__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #64748b;
	border-radius: 6px;
}
.ah-topbar__toggle:hover { background: #f1f5f9; }

.ah-topbar__greeting { font-size: 15px; color: #475569; }
.ah-topbar__greeting strong { color: #0f172a; font-weight: 700; }

.ah-topbar__right { display: flex; align-items: center; gap: 14px; }

/* Notification dropdown */
.ah-notif { position: relative; }

.ah-notif__btn {
	position: relative;
	background: #fff;
	border: 1px solid #e2e2e6;
	cursor: pointer;
	padding: 10px 16px;
	color: #0f172a;
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13.5px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.ah-notif__btn:hover { background: #fafafa; }
.ah-notif__btn-label { white-space: nowrap; }
.ah-notif__btn-chev { color: #64748b; }

.ah-notif__dot {
	position: absolute;
	top: 5px; right: 5px;
	width: 8px; height: 8px;
	background: #ef4444;
	border-radius: 50%;
	border: 2px solid #fff;
}

.ah-notif__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 240px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0,0,0,.12);
	border: 1px solid #e5e9f2;
	z-index: 400;
	overflow: hidden;
}
.ah-notif__dropdown.is-open { display: block; }

.ah-notif__header {
	padding: 10px 14px 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #94a3b8;
	border-bottom: 1px solid #f1f5f9;
}

.ah-notif__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	font-size: 13px;
	color: #334155;
	text-decoration: none;
	transition: background .12s;
}
.ah-notif__item:hover { background: #f8fafc; text-decoration: none; }

.ah-notif__item-icon {
	width: 26px; height: 26px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ah-notif__item-icon--blue,
.ah-notif__item-icon--green,
.ah-notif__item-icon--orange,
.ah-notif__item-icon--red,
.ah-notif__item-icon--indigo { background: #eef1f4; color: #274566; }

.ah-notif__empty {
	padding: 16px 14px;
	font-size: 13px;
	color: #94a3b8;
	text-align: center;
}

.ah-notif__divider {
	height: 1px;
	background: #f1f5f9;
	margin: 2px 0;
}

.ah-notif__item--action {
	font-size: 12.5px;
	color: #64748b;
}

.ah-topbar__avatar {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: #6683A1;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	overflow: hidden;
	flex-shrink: 0;
	cursor: pointer;
	border: 2px solid #e0e7ff;
}
.ah-topbar__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ----------------------------------------------------------
   Account dropdown (topbar) — name/avatar + profile/sign-out
   moved here from the sidebar.
   ---------------------------------------------------------- */
.ah-account { position: relative; }

.ah-account__btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 3px 8px 3px 3px;
	cursor: pointer;
	border-radius: 22px;
	transition: background .12s;
}
.ah-account__btn:hover { background: #f1f5f9; }

.ah-account__avatar-img,
.ah-account__avatar-initials {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	font-weight: 700;
	color: #fff;
	background: #6683A1;
	border: 2px solid #e0e7ff;
	overflow: hidden;
	flex-shrink: 0;
}
.ah-account__avatar-img { object-fit: cover; }

.ah-account__chev { color: #94a3b8; flex-shrink: 0; }
.ah-account__btn:hover .ah-account__chev { color: #475569; }

.ah-account__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 230px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0,0,0,.14);
	border: 1px solid #e5e9f2;
	z-index: 500;
	overflow: hidden;
}
.ah-account__dropdown.is-open { display: block; }

.ah-account__header {
	padding: 12px 14px 10px;
	background: #f8fafc;
	border-bottom: 1px solid #f1f5f9;
}
.ah-account__name  { font-size: 13.5px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.ah-account__email { font-size: 11.5px; color: #64748b; margin-top: 2px; word-break: break-all; }

.ah-account__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	font-size: 13px;
	color: #334155 !important;
	text-decoration: none !important;
	transition: background .12s, color .12s;
}
.ah-account__item:hover { background: #f8fafc; color: #274566 !important; }
.ah-account__item svg { color: #94a3b8; flex-shrink: 0; }
.ah-account__item:hover svg { color: #274566; }

.ah-account__divider { height: 1px; background: #f1f5f9; margin: 0; }

.ah-account__item--danger { color: #b91c1c !important; }
.ah-account__item--danger:hover { background: #fee2e2; color: #991b1b !important; }
.ah-account__item--danger svg { color: #ef4444; }
.ah-account__item--danger:hover svg { color: #991b1b; }

.ah-content { flex: 1; padding: 24px 28px 40px; }

/* ----------------------------------------------------------
   Hero Banner
   ---------------------------------------------------------- */
.ah-hero {
	background: linear-gradient(135deg, #3d5af1 0%, #5b21b6 100%);
	border-radius: 14px;
	padding: 30px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
	position: relative;
	overflow: hidden;
	min-height: 180px;
}

.ah-hero__left { flex: 1; position: relative; z-index: 2; }

.ah-hero__eyebrow {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255,255,255,.7);
	margin: 0 0 8px;
}

.ah-hero__title {
	font-size: 26px;
	font-weight: 800;
	color: #fff;
	margin: 0 0 8px;
	line-height: 1.2;
}

.ah-hero__sub {
	font-size: 13.5px;
	color: rgba(255,255,255,.8);
	margin: 0 0 18px;
	max-width: 420px;
	line-height: 1.6;
}

.ah-hero__stats {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.ah-hero__stat { display: flex; flex-direction: column; }
.ah-hero__stat-num { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.ah-hero__stat-label { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 3px; }
.ah-hero__stat-sep { width: 1px; height: 32px; background: rgba(255,255,255,.25); }

.ah-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #fff;
	color: #3d5af1;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	transition: opacity .15s, transform .15s;
	box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.ah-hero__btn:hover { opacity: .92; color: #3d5af1; text-decoration: none; transform: translateY(-1px); }

.ah-hero__right { flex-shrink: 0; width: 220px; position: relative; z-index: 2; }

.ah-hero__illustration { position: relative; height: 140px; }

.ah-hero__circle {
	position: absolute;
	border-radius: 50%;
}
.ah-hero__circle--lg {
	width: 130px; height: 130px;
	border: 2px solid rgba(255,255,255,.15);
	background: rgba(255,255,255,.06);
	top: 5px; right: 10px;
}
.ah-hero__circle--md {
	width: 80px; height: 80px;
	background: rgba(255,255,255,.08);
	border: 2px solid rgba(255,255,255,.12);
	top: 30px; right: 55px;
}
.ah-hero__circle--sm {
	width: 45px; height: 45px;
	background: rgba(255,255,255,.14);
	top: 10px; right: 50px;
}

/* ----------------------------------------------------------
   Quick Action Cards
   ---------------------------------------------------------- */
.ah-dashboard-panel {
	background: #fff;
	border-radius: 20px;
	padding: 24px 26px;
	box-shadow: 0 2px 14px rgba(15,23,42,.06);
	margin-bottom: 18px;
}
.ah-dashboard-panel__title {
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 18px;
}

.ah-quick-actions {
	/* Even columns that always fill the width: 2 tiles split 50/50, 3 into thirds,
	   4 into quarters — with hairline dividers between them. No fixed 4-col grid,
	   so locked-down tiles never leave an empty half on the right. Wraps on phones. */
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.ah-qa-card {
	flex: 1 1 200px;
	background: transparent;
	border-left: 1px solid #eef0f3;
	padding: 4px 20px;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: opacity .15s;
}
.ah-qa-card:first-child { border-left: none; }
.ah-qa-card:hover { opacity: .75; text-decoration: none; color: inherit; }

.ah-qa-card__icon {
	width: 56px; height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	font-size: 24px;
	background: #6683A1 !important;
}
.ah-qa-card__count { display: none; }
.ah-qa-card__title {
	font-size: 15.5px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ah-qa-card__title::after {
	content: '\203A';
	font-size: 18px;
	font-weight: 400;
	color: #94a3b8;
}
.ah-qa-card__desc { display: none; }

@media (max-width: 720px) {
	.ah-qa-card { border-left: none; }
}

/* ----------------------------------------------------------
   Section heading
   ---------------------------------------------------------- */
/* Welcome header (matches UI/1.png) */
.ah-welcome { margin: 2px 0 24px; }
.ah-welcome__title {
	font-size: 30px;
	font-weight: 800;
	color: #0f1530;
	letter-spacing: -.5px;
	line-height: 1.15;
	margin: 0 0 6px;
}
.ah-welcome__sub { font-size: 15.5px; color: #64748b; margin: 0; }
@media (max-width: 600px) { .ah-welcome__title { font-size: 24px; } }

.ah-section-heading {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 14px;
}

/* ----------------------------------------------------------
   Generic card
   ---------------------------------------------------------- */
.ah-card {
	background: #fff;
	border-radius: 16px;
	padding: 20px 22px;
	box-shadow: 0 2px 14px rgba(15,23,42,.06);
	border: 1px solid rgba(15,23,42,.04);
}

.ah-card__hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	font-size: 13.5px;
	font-weight: 700;
	color: #0f172a;
}
.ah-card__hd a { font-size: 12px; font-weight: 500; color: #274566; text-decoration: none; }
.ah-card__hd a:hover { text-decoration: underline !important; }

.ah-card__footer-link {
	display: block;
	margin-top: 12px;
	font-size: 12.5px;
	color: #274566;
	text-decoration: none;
	font-weight: 500;
	text-align: center;
	padding-top: 10px;
	border-top: 1px solid #f1f5f9;
}
.ah-card__footer-link:hover { text-decoration: underline !important; }

/* ----------------------------------------------------------
   Row layouts
   ---------------------------------------------------------- */
.ah-row { display: grid; gap: 16px; margin-bottom: 16px; }
.ah-row--3col { grid-template-columns: 2fr 1.4fr 1.4fr; }
/* auto-fit: whatever cards survive gating stretch to fill the row evenly, and a
   hidden card (no Newsletters, no ClickUp Tasks) collapses its track instead of
   leaving a blank column. minmax keeps each card readable before it wraps. */
.ah-row--3col-wide { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ah-row--4col { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ----------------------------------------------------------
   Announcements
   ---------------------------------------------------------- */
.ah-announce-item {
	display: flex;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid #f1f5f9;
}
.ah-announce-item:last-child { border-bottom: none; padding-bottom: 0; }

.ah-announce-item__icon {
	font-size: 18px;
	flex-shrink: 0;
	width: 36px; height: 36px;
	background: #f1f5f9;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ah-announce-item__body { flex: 1; min-width: 0; }

.ah-announce-item__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}
.ah-announce-item__date { font-size: 11px; color: #94a3b8; }
.ah-announce-item__dismiss {
	background: transparent;
	border: 0;
	cursor: pointer;
	color: #cbd5e1;
	font-size: 18px;
	line-height: 1;
	padding: 2px 6px;
	border-radius: 6px;
	transition: background .12s, color .12s;
}
.ah-announce-item__dismiss:hover { background: #fee2e2; color: #b91c1c; }
.ah-announce-item__title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 4px;
	text-decoration: none;
}
.ah-announce-item__title:hover { color: #274566; text-decoration: underline; }
.ah-announce-item__pdf-badge { font-size: 11px; margin-left: 4px; }
.ah-announce-item__text {
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ah-announce-item__readmore {
	display: inline-block;
	margin-top: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: #274566;
	text-decoration: none;
}
.ah-announce-item__readmore:hover { text-decoration: underline; }
.ah-announce-viewall {
	display: block;
	text-align: center;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #f1f5f9;
	font-size: 12.5px;
	font-weight: 600;
	color: #274566;
	text-decoration: none;
}
.ah-announce-viewall:hover { text-decoration: underline; }

/* ----------------------------------------------------------
   Newsletters — dedicated list + detail pages
   ---------------------------------------------------------- */
.ah-news-list { display: flex; flex-direction: column; gap: 14px; }

.ah-news-card {
	display: flex;
	gap: 16px;
	padding: 18px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	text-decoration: none;
	transition: box-shadow .15s, border-color .15s, transform .15s;
}
.ah-news-card:hover {
	box-shadow: 0 4px 16px rgba(15, 23, 42, .08);
	border-color: #cbd5e1;
	transform: translateY(-1px);
}
.ah-news-card__icon {
	font-size: 24px;
	flex-shrink: 0;
	width: 48px; height: 48px;
	background: #f1f5f9;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ah-news-card__body { flex: 1; min-width: 0; }
.ah-news-card__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}
.ah-news-card__title { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0; }
.ah-news-card__pdf-badge {
	display: inline-block;
	margin-left: 8px;
	font-size: 10.5px;
	font-weight: 700;
	color: #5b21b6;
	background: #ede9fe;
	border-radius: 999px;
	padding: 2px 8px;
	vertical-align: middle;
}
.ah-news-card__date { font-size: 11.5px; color: #94a3b8; white-space: nowrap; }
.ah-news-card__excerpt { font-size: 13px; color: #64748b; line-height: 1.6; margin: 0 0 8px; }
.ah-news-card__cta { font-size: 12.5px; font-weight: 600; color: #274566; }

.ah-news-back {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	margin-bottom: 4px;
}
.ah-news-back:hover { color: #274566; text-decoration: underline; }

.ah-news-detail { padding: 28px; }
.ah-news-detail__head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid #f1f5f9;
}
.ah-news-detail__icon {
	font-size: 30px;
	flex-shrink: 0;
	width: 56px; height: 56px;
	background: #f1f5f9;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ah-news-detail__title { font-size: 21px; font-weight: 800; color: #0f172a; margin: 0 0 4px; }
.ah-news-detail__date { font-size: 12.5px; color: #94a3b8; }
.ah-news-detail__body {
	font-size: 14.5px;
	line-height: 1.75;
	color: #334155;
}
.ah-news-detail__body p { margin: 0 0 1em; }
.ah-news-detail__body a { color: #274566; }

.ah-news-pdf { margin-top: 24px; border-top: 1px solid #f1f5f9; padding-top: 20px; }
.ah-news-pdf__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.ah-news-pdf__label { font-size: 13px; font-weight: 600; color: #475569; }
.ah-news-pdf__viewer {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
	max-height: 900px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}
.ah-news-pdf__loading, .ah-news-pdf__error { font-size: 13px; color: #94a3b8; padding: 24px; }
.ah-news-pdf__page {
	max-width: 100%;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
}
.ah-news-pdf__page canvas { display: block; max-width: 100%; height: auto; }

/* Tags */
.ah-tag {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.ah-tag--blue   { background: #dbeafe; color: #1d4ed8; }
.ah-tag--pink   { background: #fce7f3; color: #be185d; }
.ah-tag--green  { background: #dcfce7; color: #15803d; }
.ah-tag--orange { background: #ffedd5; color: #ea580c; }
.ah-tag--purple { background: #ede9fe; color: #5b21b6; }

/* ----------------------------------------------------------
   Client Profile
   ---------------------------------------------------------- */
.ah-card--profile { text-align: center; }

.ah-profile__avatar-wrap {
	position: relative;
	display: inline-block;
	margin-bottom: 12px;
}

.ah-profile__avatar {
	width: 74px; height: 74px;
	border-radius: 50%;
	background: #6683A1;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 700;
	overflow: hidden;
	border: 3px solid #eef0f3;
	margin: 0 auto;
}
.ah-profile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ah-profile__online {
	position: absolute;
	bottom: 3px; right: 3px;
	width: 13px; height: 13px;
	background: #22c55e;
	border-radius: 50%;
	border: 2px solid #fff;
}

.ah-profile__name    { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.ah-profile__email   { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.ah-profile__phone   { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.ah-profile__company { font-size: 12px; color: #64748b; font-style: italic; margin-bottom: 10px; }
.ah-empty-state      { padding: 20px 0; text-align: center; font-size: 13px; color: #94a3b8; }

/* ----------------------------------------------------------
   Team directory
   ---------------------------------------------------------- */
.ah-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

.ah-team-member {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.ah-team-member__avatar {
	flex-shrink: 0;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: #6683A1;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 700;
}

.ah-team-member__name    { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.ah-team-member__role    { font-size: 12px; color: #64748b; margin-top: 1px; }
.ah-team-member__contact { display: flex; gap: 8px; margin-top: 6px; }
.ah-team-member__contact a {
	color: #94a3b8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px; height: 24px;
	border-radius: 6px;
	background: #f8fafc;
	transition: background .12s, color .12s;
}
.ah-team-member__contact a:hover { background: #eef2ff; color: #274566; }

/* ----------------------------------------------------------
   Project roadmap (milestone stepper)
   ---------------------------------------------------------- */
.ah-roadmap {
	display: flex;
	align-items: flex-start;
	overflow-x: auto;
	padding-top: 4px;
}

.ah-roadmap__step {
	position: relative;
	flex: 1 0 120px;
	min-width: 120px;
	text-align: center;
	padding: 0 8px;
}

.ah-roadmap__step:not(:first-child)::before {
	content: '';
	position: absolute;
	top: 11px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: #e2e8f0;
	z-index: 0;
}
.ah-roadmap__step--done:not(:first-child)::before,
.ah-roadmap__step--current:not(:first-child)::before {
	background: #274566;
}

.ah-roadmap__dot {
	position: relative;
	z-index: 1;
	width: 24px; height: 24px;
	border-radius: 50%;
	margin: 0 auto 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 2px solid #cbd5e1;
	color: #fff;
}
.ah-roadmap__step--done .ah-roadmap__dot { background: #274566; border-color: #274566; }
.ah-roadmap__step--current .ah-roadmap__dot { background: #fff; border-color: #274566; box-shadow: 0 0 0 4px rgba(39,69,102,.15); }
.ah-roadmap__step--current .ah-roadmap__dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #274566; }
.ah-roadmap__step--upcoming .ah-roadmap__dot { background: #fff; border-color: #cbd5e1; }

.ah-roadmap__label { font-size: 12.5px; font-weight: 600; color: #334155; }
.ah-roadmap__step--upcoming .ah-roadmap__label { color: #94a3b8; font-weight: 500; }

.ah-roadmap__tag {
	margin-top: 4px;
	display: inline-block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #274566;
	background: #eef2ff;
	padding: 2px 8px;
	border-radius: 10px;
}

@media (max-width: 720px) {
	.ah-roadmap { flex-direction: column; align-items: flex-start; gap: 14px; }
	.ah-roadmap__step { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 0; }
	.ah-roadmap__step:not(:first-child)::before { display: none; }
	.ah-roadmap__dot { margin: 0; }
}

.ah-profile__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #475569;
	background: #f8fafc;
	padding: 4px 12px;
	border-radius: 20px;
	border: 1px solid #e2e8f0;
	margin-bottom: 14px;
}

.ah-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ah-status-dot--green { background: #22c55e; }

/* ----------------------------------------------------------
   "Hi Client!" welcome message card
   ---------------------------------------------------------- */
.ah-card--hi { display: flex; flex-direction: column; justify-content: center; }
.ah-card--hi__welcome { font-size: 19px; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.ah-card--hi__msg { font-size: 13px; color: #64748b; line-height: 1.65; margin: 0; }

/* ----------------------------------------------------------
   Onboarding Progress
   ---------------------------------------------------------- */
.ah-onboard__pct { font-size: 12px; font-weight: 600; color: #274566; }

.ah-progress {
	height: 7px;
	background: #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 14px;
}
.ah-progress__bar {
	height: 100%;
	background: #6683A1;
	border-radius: 10px;
}

.ah-checklist { list-style: none; margin: 0; padding: 0; }

.ah-checklist__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	font-size: 13px;
	color: #64748b;
	border-bottom: 1px solid #f8fafc;
}
.ah-checklist__item:last-child { border-bottom: none; }
.ah-checklist__item--done { color: #0f172a; font-weight: 500; }

.ah-checklist__icon {
	width: 20px; height: 20px;
	border-radius: 50%;
	border: 2px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #fff;
}
.ah-checklist__item--done .ah-checklist__icon {
	background: #274566;
	border-color: #274566;
	color: #fff;
}

/* ----------------------------------------------------------
   Quick Links
   ---------------------------------------------------------- */
.ah-quick-links { list-style: none; margin: 0; padding: 0; }
.ah-quick-links li { border-bottom: 1px solid #f1f5f9; }
.ah-quick-links li:last-child { border-bottom: none; }

.ah-quick-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	color: #334155;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: color .12s;
}
.ah-quick-link:hover { color: #274566; text-decoration: none; }
.ah-quick-link svg { color: #94a3b8; flex-shrink: 0; }

/* ----------------------------------------------------------
   Invoices table
   ---------------------------------------------------------- */
/* Horizontal-scroll wrapper (added around every .ah-table by portal-layout.php's
   JS). On desktop the table fits and no scrollbar shows; on narrow screens the
   table keeps its natural width and scrolls sideways instead of blowing out the
   page. -webkit-overflow-scrolling gives iOS momentum scrolling. */
.ah-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ah-table-scroll .ah-table { min-width: 520px; }

.ah-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.ah-table th {
	text-align: left;
	padding: 8px 10px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #94a3b8;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.ah-table td {
	padding: 10px 10px;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
	vertical-align: middle;
}
.ah-table tr:last-child td { border-bottom: none; }
.ah-table tbody tr:hover td { background: #f8fafc; }
.ah-table__num { font-family: monospace; font-size: 11.5px; color: #64748b; }

/* Status badges */
.ah-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
}
.ah-badge--paid       { background: #dcfce7; color: #15803d; }
.ah-badge--overdue    { background: #fee2e2; color: #b91c1c; }
.ah-badge--due        { background: #dbeafe; color: #1d4ed8; }
.ah-badge--draft      { background: #f1f5f9; color: #475569; }
.ah-badge--sent       { background: #dbeafe; color: #1d4ed8; }
.ah-badge--cancelled  { background: #f1f5f9; color: #64748b; }
.ah-badge--open       { background: #dbeafe; color: #1d4ed8; }
.ah-badge--in-progress { background: #ede9fe; color: #5b21b6; }
.ah-badge--resolved   { background: #dcfce7; color: #15803d; }
.ah-badge--closed     { background: #f1f5f9; color: #64748b; }
.ah-badge--waiting    { background: #fef3c7; color: #92400e; }
.ah-badge--active     { background: #dcfce7; color: #15803d; }
.ah-badge--accepted   { background: #dcfce7; color: #15803d; }
.ah-badge--declined   { background: #fee2e2; color: #b91c1c; }

/* ----------------------------------------------------------
   Tasks
   ---------------------------------------------------------- */
.ah-task-list { list-style: none; margin: 0; padding: 0; }

.ah-task-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
}
.ah-task-item:last-child { border-bottom: none; }

.ah-task-item__left {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.ah-task-item__title { font-size: 13px; color: #0f172a; font-weight: 500; line-height: 1.4; }
.ah-task-item__due   { font-size: 11.5px; color: #94a3b8; white-space: nowrap; flex-shrink: 0; }

.ah-priority {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
	flex-shrink: 0;
}
.ah-priority--high   { background: #fee2e2; color: #b91c1c; }
.ah-priority--medium { background: #fef3c7; color: #92400e; }
.ah-priority--low    { background: #dcfce7; color: #15803d; }
.ah-priority--urgent { background: #fee2e2; color: #7f1d1d; }
.ah-priority--normal { background: #f1f5f9; color: #475569; }

/* ----------------------------------------------------------
   Services Grid
   ---------------------------------------------------------- */
.ah-services-grid {
	display: grid;
	/* auto-fit so 3 cards fill the width evenly instead of leaving a 4th empty
	   column; on wider screens it still tops out around 4 across. */
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.ah-svc-card {
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(15,23,42,.06);
	transition: transform .15s, box-shadow .15s;
}
.ah-svc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.09); }

/* Card top: a full-width banner strip. With a banner it's the photo (cover);
   without one it's a neutral gray strip with the service icon centered. */
.ah-svc-card__img {
	position: relative;
	width: 100%;
	height: 132px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #e2e8f0;
}
.ah-svc-card__img--photo {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.ah-svc-card__img--empty {
	background: linear-gradient(135deg,#eef2f7 0%,#dbe2ea 100%);
	font-size: 46px;
	line-height: 1;
}
.ah-svc-card__emoji { font-size: 46px; line-height: 1; }
/* Custom uploaded icon: a centered mark on the empty strip (not full-bleed). */
.ah-svc-card__img--empty .agency-svc-icon-img {
	width: 64px; height: 64px;
	object-fit: contain;
	border-radius: 14px;
	display: block;
}
/* Custom uploaded icon fills the detail-header square. */
.ah-svc-detail__icon .agency-svc-icon-img {
	width: 100%; height: 100%;
	object-fit: cover;
	border-radius: inherit;
	display: block;
}
.ah-svc-detail__icon { overflow: hidden; }
.ah-svc-card__body  { padding: 8px 18px 22px; text-align: center; }
.ah-svc-card__title { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 6px; overflow-wrap: break-word; }
.ah-svc-card__desc  { font-size: 12.5px; color: #64748b; line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-svc-card__price { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: #0f172a; margin-bottom: 12px; }
.ah-svc-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #fff;
	background: #274566;
	text-decoration: none;
	font-weight: 700;
	padding: 9px 18px;
	border-radius: 999px;
}
.ah-svc-card__link:hover { background: #1c3450; text-decoration: none; }

.ah-svc-card--link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.ah-svc-card--link:hover { text-decoration: none; }

.ah-svc-card__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-bottom: 12px;
}
.ah-svc-card__chip {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
}

.ah-svc-card--available { border: 1px dashed #cbd5e1; }
.ah-svc-card--available .ah-svc-card__img { opacity: .85; }

/* Status badges used on service cards/details */
.ah-badge--paused    { background: #fef3c7; color: #92400e; }
.ah-badge--pending   { background: #ffedd5; color: #9a3412; }
.ah-badge--ended     { background: #e2e8f0; color: #475569; }
.ah-badge--cancelled { background: #e2e8f0; color: #475569; }

/* "Request this service" form on Available cards — matches the old link button. */
.ah-svc-request-form { margin: 0; }

/* ----------------------------------------------------------
   Service detail
   ---------------------------------------------------------- */
.ah-svc-detail {
	background: #fff;
	border: 1px solid #eef0f4;
	border-radius: 14px;
	overflow: hidden;
}
.ah-svc-detail__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 28px 32px;
	color: #fff;
}
/* Top-light + floor-shadow so the header gradient reads as a surface, matching
   the depth on the staff-side hero and the service cards. */
.ah-svc-detail__head::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 46%, rgba(15,23,42,.16) 100%);
	pointer-events: none;
}
.ah-svc-detail__head > * { position: relative; z-index: 1; }
/* Photo variant: the banner image is composited behind the accent scrim (set
   inline) so clients see one header. Taller, with a text-shadow for legibility
   over the photo. The ::after depth overlay is dropped — the scrim already
   supplies the gradient. */
.ah-svc-detail__head--photo { min-height: 190px; align-items: flex-end; }
.ah-svc-detail__head--photo::after { content: none; }
.ah-svc-detail__head--photo .ah-svc-detail__title,
.ah-svc-detail__head--photo .ah-svc-detail__eyebrow,
.ah-svc-detail__head--photo .ah-svc-detail__tagline,
.ah-svc-detail__head--photo .ah-svc-detail__price { text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 1px 14px rgba(15,23,42,.6); }
.ah-svc-detail__head--photo .ah-svc-detail__icon { background: rgba(255,255,255,.24); }
.ah-svc-detail__icon {
	width: 72px; height: 72px;
	border-radius: 16px;
	background: rgba(255,255,255,.18);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: grid;
	place-items: center;
	font-size: 36px;
	flex-shrink: 0;
}
.ah-svc-detail__head-body { flex: 1; min-width: 0; }
.ah-svc-detail__eyebrow {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	opacity: .8;
	margin-bottom: 4px;
}
.ah-svc-detail__title {
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	margin: 0 0 10px;
	letter-spacing: -.01em;
}
.ah-svc-detail__head-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.ah-svc-detail__price {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}
.ah-svc-detail__head .ah-badge {
	background: rgba(255,255,255,.22);
	color: #fff;
}

.ah-svc-detail__section {
	padding: 22px 32px;
	border-top: 1px solid #f1f5f9;
}
.ah-svc-detail__section-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #94a3b8;
	margin-bottom: 10px;
}
.ah-svc-detail__prose {
	font-size: 14px;
	color: #334155;
	line-height: 1.65;
}
.ah-svc-detail__prose p { margin: 0 0 10px; }
.ah-svc-detail__prose p:last-child { margin-bottom: 0; }

/* Rich long-form service details (staff-authored HTML via wp_kses_post). */
.ah-svc-detail__rich h2,
.ah-svc-detail__rich h3,
.ah-svc-detail__rich h4 {
	color: #0f172a;
	font-weight: 700;
	line-height: 1.3;
	margin: 20px 0 8px;
}
.ah-svc-detail__rich h2 { font-size: 19px; }
.ah-svc-detail__rich h3 { font-size: 16px; }
.ah-svc-detail__rich h4 { font-size: 14px; }
.ah-svc-detail__rich > *:first-child { margin-top: 0; }
.ah-svc-detail__rich ul,
.ah-svc-detail__rich ol { margin: 0 0 12px; padding-left: 22px; }
.ah-svc-detail__rich li { margin: 0 0 6px; }
.ah-svc-detail__rich a { color: #4f46e5; text-decoration: underline; }
.ah-svc-detail__rich img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; }
.ah-svc-detail__rich blockquote {
	margin: 12px 0;
	padding: 8px 14px;
	border-left: 3px solid #cbd5e1;
	background: #f8fafc;
	border-radius: 0 8px 8px 0;
	color: #475569;
}

/* Tagline under the title on the catalog "sales" page. */
.ah-svc-detail__tagline {
	font-size: 15px;
	font-weight: 500;
	color: #fff;
	opacity: .92;
	margin: 0 0 10px;
	line-height: 1.4;
}

/* "What's included" checklist on the catalog page. */
.ah-svc-detail__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
}
.ah-svc-detail__feature {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 14px;
	color: #334155;
	line-height: 1.5;
}
.ah-svc-detail__feature svg {
	flex-shrink: 0;
	margin-top: 2px;
	color: #16a34a;
}
@media (max-width: 700px) {
	.ah-svc-detail__features { grid-template-columns: 1fr; }
}

/* "View & request →" call-to-action chip on Available service cards. */
.ah-svc-card__chip--cta {
	background: #eef2ff;
	color: #4f46e5;
}
.ah-svc-card--link:hover .ah-svc-card__chip--cta {
	background: #4f46e5;
	color: #fff;
}
.ah-svc-detail__notes {
	font-size: 14px;
	color: #334155;
	line-height: 1.6;
	background: #f8fafc;
	border-left: 3px solid #cbd5e1;
	padding: 12px 14px;
	border-radius: 0 8px 8px 0;
	white-space: pre-wrap;
}

.ah-svc-detail__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px 28px;
	padding: 22px 32px;
	border-top: 1px solid #f1f5f9;
}
.ah-svc-detail__field-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #94a3b8;
	margin-bottom: 6px;
}
.ah-svc-detail__field-value {
	font-size: 14px;
	color: #0f172a;
}

.ah-svc-detail__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 32px;
	background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
	border-top: 1px solid #eef0f4;
}
.ah-svc-detail__cta-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 3px;
}
.ah-svc-detail__cta-sub {
	font-size: 13px;
	color: #64748b;
}

@media (max-width: 700px) {
	.ah-svc-detail__head { flex-direction: column; align-items: flex-start; padding: 22px; }
	.ah-svc-detail__section, .ah-svc-detail__grid, .ah-svc-detail__cta { padding-left: 22px; padding-right: 22px; }
	.ah-svc-detail__grid { grid-template-columns: 1fr 1fr; }
	.ah-svc-detail__cta { flex-direction: column; align-items: flex-start; }
}

/* ----------------------------------------------------------
   Client portal ticket chat (WhatsApp-style)
   ---------------------------------------------------------- */
.ahc-chat {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	display: flex;
	flex-direction: column;
	min-height: 520px;
}
.ahc-chat__body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px;
	background: #f7f8fb;
	background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.025) 1px, transparent 0);
	background-size: 22px 22px;
	max-height: 560px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ahc-chat__day { display: flex; justify-content: center; margin: 6px 0 4px; }
.ahc-chat__day span {
	background: #fff; border: 1px solid #e2e8f0; color: #64748b;
	font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 12px;
	text-transform: uppercase; letter-spacing: .04em;
}
.ahc-chat__system {
	align-self: center; background: rgba(100,116,139,.08); color: #475569;
	font-size: 12px; padding: 6px 12px; border-radius: 12px;
	display: inline-flex; align-items: center; gap: 6px; max-width: 80%; text-align: center;
}
.ahc-chat__system-time { color: #94a3b8; font-size: 11px; margin-left: 4px; }

.ahc-bubble-row { display: flex; gap: 8px; max-width: 78%; align-items: flex-end; }
.ahc-bubble-row--left  { align-self: flex-start; }
.ahc-bubble-row--right { align-self: flex-end; flex-direction: row-reverse; }

.ahc-bubble-row__avatar {
	width: 32px; height: 32px; border-radius: 50%;
	background: #cbd5e1; color: #1a1f3c;
	font-size: 12px; font-weight: 700;
	display: grid; place-items: center; flex-shrink: 0; user-select: none;
}
.ahc-bubble-row--right .ahc-bubble-row__avatar { background: #2563eb; color: #fff; }

.ahc-bubble-row__body { min-width: 0; max-width: 100%; }

.ahc-bubble {
	background: #fff; border: 1px solid #e2e8f0;
	border-radius: 14px; padding: 9px 14px;
	font-size: 14px; color: #1a1f3c; line-height: 1.5;
	word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.03);
}
.ahc-bubble-row--left  .ahc-bubble { border-bottom-left-radius: 4px; }
.ahc-bubble-row--right .ahc-bubble {
	background: #2563eb; color: #fff; border-color: #2563eb;
	border-bottom-right-radius: 4px;
}
.ahc-bubble__text p { margin: 0 0 4px; }
.ahc-bubble__text p:last-child { margin-bottom: 0; }
.ahc-bubble__text a { color: inherit; text-decoration: underline !important; }

/* Soft-deleted message — same bubble shape, muted placeholder text */
.ahc-bubble__text--deleted { font-style: italic; color: #94a3b8; }
.ahc-bubble-row--right .ahc-bubble__text--deleted { color: rgba(255, 255, 255, 0.75); }
.ahc-bubble-row--deleted .ahc-bubble { background: #f8fafc; border-color: #e2e8f0; }
.ahc-bubble-row--deleted.ahc-bubble-row--right .ahc-bubble { background: #94a3b8; border-color: #94a3b8; }

/* Image attachment — full-bleed inside the bubble */
.ahc-bubble--image {
	padding: 3px;
	background: #2563eb;
	overflow: hidden;
}
.ahc-bubble-row--left .ahc-bubble--image {
	background: #f1f5f9;
	border-color: #e2e8f0;
}
.ahc-bubble__image {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
	margin-bottom: 4px;
}
.ahc-bubble__image img {
	display: block;
	max-width: 320px;
	max-height: 320px;
	width: 100%;
	height: auto;
	object-fit: cover;
	cursor: zoom-in;
}
.ahc-bubble--image .ahc-bubble__text {
	padding: 4px 10px 2px;
	color: #fff;
}
.ahc-bubble-row--left .ahc-bubble--image .ahc-bubble__text { color: #1a1f3c; }
.ahc-bubble--image .ahc-bubble__footer { padding: 0 10px 6px; }

/* File attachment chip — non-image documents */
.ahc-bubble__file {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: rgba(255,255,255,.16);
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
	margin-bottom: 4px;
	min-width: 220px;
	max-width: 320px;
	transition: background .12s;
}
.ahc-bubble__file:hover { background: rgba(255,255,255,.26); text-decoration: none; }
.ahc-bubble-row--left .ahc-bubble__file {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
}
.ahc-bubble-row--left .ahc-bubble__file:hover { background: #f1f5f9; }
.ahc-bubble__file-icon {
	width: 38px; height: 38px;
	border-radius: 8px;
	background: rgba(255,255,255,.2);
	display: grid; place-items: center;
	font-size: 18px;
	flex-shrink: 0;
}
.ahc-bubble-row--left .ahc-bubble__file-icon { background: #e0e7ff; }
.ahc-bubble__file-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}
.ahc-bubble__file-name {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
}
.ahc-bubble__file-size {
	font-size: 11.5px;
	opacity: .75;
	margin-top: 1px;
}

.ahc-bubble__footer {
	display: flex; align-items: center; gap: 4px;
	justify-content: flex-end; margin-top: 2px;
	font-size: 10.5px; color: #94a3b8; white-space: nowrap;
}
.ahc-bubble-row--right .ahc-bubble__footer { color: rgba(255,255,255,.75); }
.ahc-bubble__time { line-height: 1; }
.ahc-bubble__ticks { display: inline-flex; align-items: center; line-height: 1; color: currentColor; }
.ahc-bubble__ticks--read { color: #53bdeb !important; }

.ahc-bubble-row__meta { font-size: 11px; color: #94a3b8; margin-top: 4px; padding: 0 4px; }
.ahc-bubble-row__meta strong { color: #475569; font-weight: 600; }
.ahc-bubble-row__role { color: #94a3b8; }
.ahc-bubble-row--right .ahc-bubble-row__meta { text-align: right; }

/* Composer */
.ahc-chat__composer {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 16px 14px;
	background: #fff;
	border-top: 1px solid #e2e8f0;
}
.ahc-chat__composer-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}
.ahc-chat__attach-btn {
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #475569;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	font-size: 0;
	transition: background .15s ease, color .15s ease;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
}
.ahc-chat__attach-btn:hover { background: #e0e7ff; color: #274566; }
.ahc-chat__attach-btn svg { display: block; }
.ahc-chat__file-input { display: none; }

.ahc-chat__attach-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
}
/* Honor the `hidden` attribute — author CSS otherwise wins over the UA default. */
.ahc-chat__attach-preview[hidden] { display: none; }
.ahc-chat__attach-icon {
	width: 36px; height: 36px;
	border-radius: 8px;
	background: #fff;
	display: grid; place-items: center;
	font-size: 18px;
	overflow: hidden;
	flex-shrink: 0;
}
.ahc-chat__attach-icon img { width: 100%; height: 100%; object-fit: cover; }
.ahc-chat__attach-info { flex: 1; min-width: 0; }
.ahc-chat__attach-name {
	font-size: 13px; font-weight: 600; color: #1a1f3c;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ahc-chat__attach-size { font-size: 11.5px; color: #64748b; margin-top: 1px; }
.ahc-chat__attach-remove {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: transparent; color: #64748b;
	border: 0; cursor: pointer;
	font-size: 20px; line-height: 1;
	display: grid; place-items: center;
	transition: background .12s, color .12s;
}
.ahc-chat__attach-remove:hover { background: #fee2e2; color: #b91c1c; }
.ahc-chat__input {
	flex: 1;
	min-height: 44px;
	max-height: 200px;
	padding: 12px 16px;
	border: 1px solid #d1d5db;
	border-radius: 22px;
	font-size: 14px;
	font-family: inherit;
	background: #f7f8fb;
	color: #1a1f3c;
	resize: none;
	line-height: 1.5;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.ahc-chat__input::placeholder { color: #94a3b8; }
.ahc-chat__input:focus {
	outline: none;
	border-color: #2563eb;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
/* Thin scrollbar without the Windows ▲▼ arrow buttons once the message overflows. */
.ahc-chat__input { overflow-y: auto; scrollbar-width: thin; }
.ahc-chat__input::-webkit-scrollbar { width: 8px; }
.ahc-chat__input::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.ahc-chat__input::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.ahc-chat__input::-webkit-scrollbar-track { background: transparent; }

.ahc-chat__send {
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #6683A1;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	font-size: 0;
	text-align: center;
	-webkit-appearance: none;
	appearance: none;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(37,99,235,.28), 0 1px 2px rgba(0,0,0,.06);
	transition: transform .12s ease, box-shadow .12s ease, background .15s ease, opacity .15s;
	position: relative;
}
.ahc-chat__send:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(37,99,235,.36), 0 1px 2px rgba(0,0,0,.06);
}
.ahc-chat__send:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(37,99,235,.32);
}
.ahc-chat__send:disabled {
	cursor: not-allowed;
	opacity: .45;
	box-shadow: none;
	background: #cbd5e1;
}
.ahc-chat__send:focus-visible {
	outline: 2px solid #93c5fd;
	outline-offset: 2px;
}
/* Absolute positioning is the nuclear option: it ignores any theme-injected
   padding / text-align / line-height on the button and locks the icon to the
   visual center of the circle. */
.ahc-chat__send-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition: transform .15s ease;
}
.ahc-chat__send:hover:not(:disabled) .ahc-chat__send-icon {
	transform: translate(-50%, -50%) translateX(1px);
}

/* Pending / failed state on outgoing bubbles */
.ahc-bubble-row--pending .ahc-bubble { opacity: .9; }
.ahc-bubble-row--failed .ahc-bubble {
	background: #fef2f2;
	color: #991b1b;
	border-color: #fecaca;
	cursor: pointer;
}
.ahc-bubble-row--failed .ahc-bubble__footer { color: #b91c1c; }
.ahc-bubble__ticks--pending { color: rgba(255,255,255,.85); }
.ahc-bubble-row--left .ahc-bubble__ticks--pending { color: #64748b; }
.ahc-bubble__ticks--failed {
	background: #dc2626;
	color: #fff;
	font-weight: 700;
	font-size: 10px;
	width: 14px; height: 14px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ahc-chat__closed {
	padding: 22px; text-align: center; background: #f8fafc;
	border-top: 1px solid #e2e8f0; color: #64748b; font-size: 13.5px;
}

/* Inline toast for send/poll errors */
.ahc-chat { position: relative; }
.ahc-chat__toast {
	position: absolute;
	left: 50%;
	bottom: 80px;
	transform: translateX(-50%) translateY(8px);
	background: #1f2937;
	color: #fff;
	font-size: 13px;
	padding: 10px 16px;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(0,0,0,.18);
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s ease, transform .2s ease;
	max-width: 90%;
	text-align: center;
	z-index: 5;
}
.ahc-chat__toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ----------------------------------------------------------
   Book-a-Meeting Card
   ---------------------------------------------------------- */
.ah-booking-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 22px 26px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ah-booking-card__head {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.ah-booking-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
	display: grid;
	place-items: center;
	font-size: 22px;
	flex-shrink: 0;
}
.ah-booking-card__title {
	font-size: 17px;
	font-weight: 700;
	color: #1a1f3c;
	margin-bottom: 3px;
}
.ah-booking-card__sub {
	font-size: 13.5px;
	color: #64748b;
	line-height: 1.5;
}
.ah-booking-card__btns {
	margin-left: auto;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.ah-booking-card__btn { flex-shrink: 0; }
.ah-booking-card__embed {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #f1f5f9;
}
.ah-booking-card__embed iframe {
	width: 100%;
	min-height: 600px;
	border: none;
	border-radius: 8px;
	display: block;
}
@media (max-width: 640px) {
	.ah-booking-card__btns { margin-left: 0; width: 100%; flex-direction: column; }
	.ah-booking-card__btn { width: 100%; justify-content: center; }
	.ah-booking-card__embed iframe { min-height: 520px; }
}

/* ----------------------------------------------------------
   CTA Banner
   ---------------------------------------------------------- */
.ah-cta-banner {
	background: linear-gradient(135deg, #1a1f3c 0%, #2d1b6e 100%);
	border-radius: 14px;
	padding: 24px 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}
.ah-cta-banner__body { display: flex; align-items: center; gap: 16px; }
.ah-cta-banner__icon { font-size: 28px; flex-shrink: 0; }
.ah-cta-banner__title { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.ah-cta-banner__sub   { font-size: 13px; color: rgba(255,255,255,.65); }

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.ah-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: opacity .15s, transform .12s, background .12s;
	line-height: 1;
	font-family: inherit;
	white-space: nowrap;
	text-align: center;
	justify-content: center;
}
.ah-btn--primary { background: #274566; color: #fff; }
.ah-btn--primary:hover { background: #1c3450; color: #fff; text-decoration: none; }
.ah-btn--outline { background: transparent; color: #274566; border: 1.5px solid #274566; }
.ah-btn--outline:hover { background: #274566; color: #fff; text-decoration: none; }
.ah-btn--cta { background: #274566; color: #fff; padding: 11px 22px; font-size: 13.5px; flex-shrink: 0; }
.ah-btn--cta:hover { background: #1c3450; color: #fff; text-decoration: none; transform: translateY(-1px); }
.ah-btn--sm   { padding: 7px 14px; font-size: 12.5px; border-radius: 7px; }
.ah-btn--full { width: 100%; display: flex; }
.ah-btn--danger { background: #fee2e2; color: #b91c1c; border: 1.5px solid #fecaca; }
.ah-btn--danger:hover { background: #b91c1c; color: #fff; border-color: #b91c1c; text-decoration: none; }

/* ----------------------------------------------------------
   Portal footer
   ---------------------------------------------------------- */
.ah-portal-footer {
	background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
	border: 1px solid #eef0f4;
	border-radius: 16px;
	padding: 32px 36px 28px;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: 44px;
	margin-top: 22px;
}
.ah-portal-footer__col--brand .ah-portal-footer__brand-name {
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 6px;
	letter-spacing: -.01em;
}
.ah-portal-footer__tagline {
	font-size: 13px;
	color: #64748b;
	line-height: 1.55;
	margin: 0 0 18px;
	max-width: 320px;
}
.ah-portal-footer__heading {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: #94a3b8;
	margin-bottom: 14px;
}
.ah-portal-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ah-portal-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: #475569;
	line-height: 1.5;
	margin-bottom: 10px;
}
.ah-portal-footer__contact li svg {
	flex: none;
	color: #274566;
	margin-top: 3px;
}
.ah-portal-footer__contact li a {
	color: #475569;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color .12s, border-color .12s;
}
.ah-portal-footer__contact li a:hover {
	color: #274566;
	border-bottom-color: #c7d2fe;
}
.ah-portal-footer__nav {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ah-portal-footer__nav li { margin-bottom: 8px; }
.ah-portal-footer__nav a {
	font-size: 13.5px;
	color: #475569;
	text-decoration: none;
	transition: color .12s;
}
.ah-portal-footer__nav a:hover { color: #274566; }

.ah-portal-footer__social {
	display: flex;
	gap: 10px;
}
.ah-social {
	width: 34px; height: 34px;
	border-radius: 8px;
	background: #f1f5f9;
	color: #475569;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background .15s, color .15s, transform .15s;
}
.ah-social:hover {
	background: #274566;
	color: #fff;
	transform: translateY(-1px);
	text-decoration: none;
}

.ah-portal-footer__bar {
	margin-top: 14px;
	padding: 14px 4px 6px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 12.5px;
	color: #94a3b8;
	flex-wrap: wrap;
}
.ah-portal-footer__powered {
	font-size: 11.5px;
	letter-spacing: .03em;
	color: #cbd5e1;
}

/* Clickable table rows */
.ah-table--clickable tbody tr[data-href] { cursor: pointer; transition: background .12s; }
.ah-table--clickable tbody tr[data-href]:hover { background: #f8fafc; }

/* ----------------------------------------------------------
   Legacy / module-shared styles (used by tickets, billing, etc.)
   ---------------------------------------------------------- */
.agency-portal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.agency-portal-table th { text-align: left; padding: 9px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.agency-portal-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.agency-portal-table tr:last-child td { border-bottom: none; }
.agency-portal-table tbody tr:hover td { background: #f8fafc; }
.agency-portal-table--compact th, .agency-portal-table--compact td { padding: 8px 12px; }

.agency-portal-notice { padding: 12px 16px; border-radius: 7px; margin-bottom: 18px; font-size: 13px; line-height: 1.5; }
.agency-portal-notice--success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.agency-portal-notice--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.agency-portal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.agency-portal-header h1, .agency-portal-header h2 { margin: 0; font-size: 19px; font-weight: 700; color: #0f172a; }

.agency-portal-form { max-width: 560px; }
.agency-form-row { margin-bottom: 16px; }
.agency-form-row label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: #475569; }
.agency-input, .agency-select, .agency-textarea { width: 100%; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 7px; font-size: 13.5px; color: #1e293b; background: #fff; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.agency-input:focus, .agency-select:focus, .agency-textarea:focus { outline: none; border-color: #274566; box-shadow: 0 0 0 3px rgba(39,69,102,.12); }
.agency-textarea { resize: vertical; min-height: 100px; }

.agency-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: background .15s; line-height: 1; font-family: inherit; white-space: nowrap; }
.agency-btn--primary { background: #274566; color: #fff; }
.agency-btn--primary:hover { background: #1c3450; color: #fff; text-decoration: none; }
.agency-btn--secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.agency-btn--secondary:hover { background: #e2e8f0; text-decoration: none; }
.agency-btn--danger { background: #fee2e2; color: #991b1b; }
.agency-btn--danger:hover { background: #fecaca; text-decoration: none; }
.agency-btn--sm { padding: 6px 13px; font-size: 12px; border-radius: 6px; }

.agency-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.agency-status--active      { background: #dcfce7; color: #15803d; }
.agency-status--inactive    { background: #f1f5f9; color: #64748b; }
.agency-status--draft       { background: #f1f5f9; color: #475569; }
.agency-status--sent, .agency-status--due { background: #dbeafe; color: #1d4ed8; }
.agency-status--paid        { background: #dcfce7; color: #15803d; }
.agency-status--overdue     { background: #fee2e2; color: #b91c1c; }
.agency-status--cancelled   { background: #f1f5f9; color: #64748b; }
.agency-status--accepted    { background: #dcfce7; color: #15803d; }
.agency-status--declined    { background: #fee2e2; color: #b91c1c; }
.agency-status--open        { background: #dbeafe; color: #1d4ed8; }
.agency-status--in-progress { background: #ede9fe; color: #5b21b6; }
.agency-status--waiting     { background: #fef3c7; color: #92400e; }
.agency-status--resolved    { background: #dcfce7; color: #15803d; }
.agency-status--closed      { background: #f1f5f9; color: #64748b; }

.agency-ticket-thread { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 20px; background: #fff; }
.agency-ticket-message { padding: 14px 18px; border-bottom: 1px solid #f1f5f9; }
.agency-ticket-message:last-child { border-bottom: none; }
.agency-ticket-message--staff  { background: #f0f5ff; }
.agency-ticket-message--client { background: #fff; }
.agency-ticket-message--system { background: #f8fafc; }
.agency-ticket-message-meta { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.agency-ticket-message-meta strong { color: #334155; font-size: 13px; }
.agency-ticket-message-body { font-size: 13.5px; line-height: 1.7; color: #334155; }

.agency-empty { color: #94a3b8; font-size: 13px; padding: 16px 0; }

/* ----------------------------------------------------------
   Module pages — consistent structure for all portal sections
   ---------------------------------------------------------- */
.ah-module-page { }

.ah-module-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.ah-module-header__actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
	padding-top: 4px;
}

.ah-module-title {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 10px;
	line-height: 1.2;
	position: relative;
	padding-bottom: 12px;
}
.ah-module-title::after {
	content: '';
	position: absolute;
	left: 0; bottom: 0;
	width: 46px; height: 3px;
	background: #274566;
	border-radius: 2px;
}

.ah-module-subtitle {
	font-size: 13px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}

/* ----------------------------------------------------------
   Notices / alerts
   ---------------------------------------------------------- */
.ah-notice {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 16px;
}
.ah-notice--success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.ah-notice--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.ah-notice--info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.ah-notice--warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ----------------------------------------------------------
   Stat / summary cards
   ---------------------------------------------------------- */
.ah-stat-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}

.ah-stat-card {
	background: #fff;
	border-radius: 12px;
	padding: 18px 20px;
	box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.ah-stat-card__label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #94a3b8;
	margin-bottom: 8px;
}

.ah-stat-card__value {
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: #0f172a;
}

.ah-stat-card--red   .ah-stat-card__value { color: #dc2626; }
.ah-stat-card--green .ah-stat-card__value { color: #15803d; }
.ah-stat-card--blue  .ah-stat-card__value { color: #1d4ed8; }

/* ----------------------------------------------------------
   Back link
   ---------------------------------------------------------- */
.ah-back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #64748b;
	text-decoration: none;
	padding: 4px 0;
	transition: color .12s;
}
.ah-back-link:hover { color: #274566; text-decoration: none; }

/* ----------------------------------------------------------
   Invoice detail
   ---------------------------------------------------------- */
.ah-inv-detail {
	background: #fff;
	border: 1px solid #eef0f4;
	border-radius: 14px;
	overflow: hidden;
}
.ah-inv-detail__head {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	padding: 28px 32px;
	background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
	border-bottom: 1px solid #eef0f4;
	align-items: start;
}
.ah-inv-detail__eyebrow {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #94a3b8;
	margin-bottom: 6px;
}
.ah-inv-detail__num {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 10px;
	letter-spacing: -.02em;
}
.ah-inv-detail__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #64748b;
}
.ah-inv-detail__meta-dot {
	width: 3px; height: 3px;
	border-radius: 50%;
	background: #cbd5e1;
}
.ah-inv-detail__head-right {
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	min-width: 200px;
}
.ah-inv-detail__amount {
	font-size: 30px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1;
	letter-spacing: -.02em;
}
.ah-badge--lg {
	padding: 6px 12px;
	font-size: 12px;
	border-radius: 999px;
}

.ah-inv-detail__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px 28px;
	padding: 26px 32px;
}
.ah-inv-detail__field--wide { grid-column: span 2; }
.ah-inv-detail__field-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #94a3b8;
	margin-bottom: 6px;
}
.ah-inv-detail__field-value {
	font-size: 14px;
	color: #0f172a;
	line-height: 1.5;
}

.ah-inv-detail__notes {
	padding: 0 32px 26px;
	border-top: 1px solid #f1f5f9;
	padding-top: 22px;
}
.ah-inv-detail__notes-body {
	font-size: 14px;
	color: #334155;
	line-height: 1.6;
	white-space: pre-wrap;
}

.ah-inv-detail__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 32px;
	background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
	border-top: 1px solid #eef0f4;
}
.ah-inv-detail__cta-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 3px;
}
.ah-inv-detail__cta-sub {
	font-size: 13px;
	color: #64748b;
}

@media (max-width: 700px) {
	.ah-inv-detail__head { grid-template-columns: 1fr; }
	.ah-inv-detail__head-right { text-align: left; align-items: flex-start; }
	.ah-inv-detail__grid { grid-template-columns: 1fr 1fr; }
	.ah-inv-detail__field--wide { grid-column: span 2; }
	.ah-inv-detail__cta { flex-direction: column; align-items: flex-start; }
}

/* ----------------------------------------------------------
   Documents — search bar, upload form, card grid
   ---------------------------------------------------------- */
.ah-doc-toolbar {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 18px;
	flex-wrap: wrap;
}
.ah-doc-toolbar__search {
	flex: 1;
	min-width: 240px;
	min-height: 40px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.ah-doc-toolbar__search:focus-within {
	border-color: #274566;
	box-shadow: 0 0 0 3px rgba(39,69,102,.15);
}
.ah-doc-toolbar__search > svg {
	flex: none;
	color: #94a3b8;
	display: block;
}
.ah-doc-toolbar__search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 10px 0;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 14px;
	color: #0f172a;
	font-family: inherit;
	line-height: 1.4;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.ah-doc-toolbar__search input[type="search"]:focus {
	outline: none;
	box-shadow: none;
}
.ah-doc-toolbar__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.ah-doc-toolbar__cat {
	min-height: 40px;
	padding: 0 30px 0 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 12px center;
	background-size: 12px;
	font-size: 14px;
	color: #0f172a;
	font-family: inherit;
	min-width: 180px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.ah-doc-toolbar__cat:focus {
	outline: none;
	border-color: #274566;
	box-shadow: 0 0 0 3px rgba(39,69,102,.15);
}
.ah-doc-toolbar__clear {
	font-size: 13px;
	color: #64748b;
	text-decoration: none;
	padding: 6px 4px;
}
.ah-doc-toolbar__clear:hover { color: #274566; }

/* Upload panel */
.ah-doc-upload {
	background: #fff;
	border: 1px solid #eef0f4;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 18px;
}
.ah-doc-upload[hidden] { display: none; }
.ah-doc-upload__row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.ah-doc-upload__row input[type="text"] {
	flex: 1;
	min-width: 240px;
}
.ah-doc-upload__file {
	flex: 1;
	min-width: 240px;
	padding: 9px 12px;
}
.ah-doc-upload__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.ah-doc-upload__hint {
	font-size: 12px;
	color: #94a3b8;
	margin-left: 4px;
}
.ah-doc-upload__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #e2e8f0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
}
.ah-doc-upload__meta-item strong { color: #0f172a; font-weight: 700; }
.ah-doc-upload__meta-sep { color: #cbd5e1; }
.ah-doc-upload__meta-types { color: #475569; }
.ah-btn:disabled,
.ah-btn[disabled] {
	opacity: .55;
	cursor: not-allowed;
	pointer-events: none;
}

/* Card grid */
.ah-doc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
.ah-doc-card {
	background: #fff;
	border: 1px solid #eef0f4;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ah-doc-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,.06);
	border-color: #e2e8f0;
}
.ah-doc-card__preview {
	position: relative;
	height: 130px;
	display: grid;
	place-items: center;
	background: #f8fafc;
	overflow: hidden;
}
.ah-doc-card__thumb {
	display: block;
	width: 100%;
	height: 100%;
}
.ah-doc-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ah-doc-card__icon {
	font-size: 44px;
	line-height: 1;
}
.ah-doc-card__ext {
	position: absolute;
	bottom: 10px;
	right: 10px;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .05em;
	padding: 3px 7px;
	border-radius: 4px;
}
.ah-doc-card__body {
	padding: 14px 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.ah-doc-card__title {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
.ah-doc-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ah-doc-card__chip {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	background: #e6ecff;
	color: #2645c2;
}
.ah-doc-card__chip--ghost {
	background: #f1f5f9;
	color: #475569;
}
.ah-doc-card__shared {
	font-size: 11.5px;
	color: #94a3b8;
	margin-top: auto;
}
.ah-doc-card__shared-by { display: inline-block; }

/* ----------------------------------------------------------
   Portal forms
   ---------------------------------------------------------- */
.ah-form-group  { margin-bottom: 18px; }

.ah-form-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.ah-form-input {
	width: 100%;
	padding: 10px 13px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13.5px;
	color: #1e293b;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
	font-family: inherit;
	line-height: 1.5;
	-webkit-appearance: none;
	appearance: none;
}
.ah-form-input:focus {
	outline: none;
	border-color: #274566;
	box-shadow: 0 0 0 3px rgba(39,69,102,.12);
}
.ah-form-input::placeholder { color: #9ca3af; }
.ah-form-textarea { resize: vertical; min-height: 110px; }

/* ----------------------------------------------------------
   Profile page
   ---------------------------------------------------------- */
.ah-row--profile {
	display: grid;
	grid-template-columns: 1.7fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
	align-items: start;
}

.ah-profile-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ah-profile-hero {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-bottom: 16px;
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.ah-profile-hero__avatar { flex: 0 0 auto; }

.ah-profile-hero__avatar-img {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(15,23,42,.08);
	border: 3px solid #fff;
}

.ah-profile-hero__body { flex: 1 1 auto; min-width: 0; }

.ah-profile-hero__name {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -.01em;
	margin-bottom: 2px;
}

.ah-profile-hero__sub {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 10px;
}

.ah-profile-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ah-profile-hero__chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	background: #f1f5f9;
	color: #475569;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.ah-profile-hero__chip--accent {
	background: #fef3c7;
	color: #92400e;
}

.ah-profile-hero__chip--muted {
	background: transparent;
	color: #94a3b8;
	font-weight: 500;
}

.ah-section-subhead {
	font-size: 13.5px;
	font-weight: 700;
	color: #0f172a;
	margin: 22px 0 4px;
	padding-top: 18px;
	border-top: 1px solid #e2e8f0;
}

.ah-form-help {
	font-size: 12px;
	color: #94a3b8;
	margin: 6px 0 0;
	line-height: 1.5;
}

.ah-card--tip { background: #f8fafc; }

.ah-tip-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ah-tip-list li {
	position: relative;
	padding-left: 22px;
	font-size: 12.5px;
	color: #475569;
	line-height: 1.5;
}

.ah-tip-list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	color: #16a34a;
	font-weight: 700;
}

@media (max-width: 600px) {
	.ah-profile-hero { flex-direction: column; align-items: flex-start; text-align: left; gap: 14px; }
}
.ah-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.ah-info-list { margin: 0; padding: 0; }
.ah-info-list dt {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 2px;
}
.ah-info-list dd {
	margin: 0 0 12px;
	font-size: 13.5px;
	color: #0f172a;
	line-height: 1.5;
}
.ah-info-list dd a { color: #274566; text-decoration: none; }
.ah-info-list dd a:hover { text-decoration: underline !important; }

@media (max-width: 900px) {
	.ah-row--profile { grid-template-columns: 1fr; }
	.ah-form-grid    { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   Ticket conversation thread
   ---------------------------------------------------------- */
.ah-thread { display: flex; flex-direction: column; gap: 10px; }

.ah-thread-msg {
	padding: 14px 16px;
	border-radius: 10px;
}

.ah-thread-msg--client { background: #f0f5ff; border: 1px solid #e0e7ff; }
.ah-thread-msg--staff  { background: #f8fafc; border: 1px solid #e2e8f0; }
.ah-thread-msg--system { background: #fefce8; border: 1px solid #fef08a; }

.ah-thread-msg__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.ah-thread-msg__author {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}

.ah-thread-msg__time {
	font-size: 11px;
	color: #94a3b8;
}

.ah-thread-msg__body {
	font-size: 13.5px;
	line-height: 1.7;
	color: #334155;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 1200px) {
	/* --4col / --3col-wide are auto-fit and reflow on their own; only the fixed
	   --3col row needs a tablet breakpoint. */
	.ah-row--3col { grid-template-columns: 1fr 1fr; }
	.ah-row--3col .ah-card--announce { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
	.ah-services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	.ah-row--3col { grid-template-columns: 1fr; }
	.ah-row--3col-wide { grid-template-columns: 1fr; }
	.ah-row--4col { grid-template-columns: 1fr; }
	.ah-portal-footer { grid-template-columns: 1fr; gap: 28px; padding: 26px 22px; }
	.ah-portal-footer__bar { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Dark scrim behind the open drawer — the element is created by portal-layout.php's
   JS and shown only while the sidebar is open at mobile widths. Tapping it closes
   the drawer (in addition to the existing outside-click handler). */
.ah-sidebar__backdrop {
	position: fixed;
	inset: var(--ah-viewas-offset, 0px) 0 0 0;
	background: rgba(15, 23, 42, .45);
	z-index: 290;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.ah-sidebar__backdrop.is-open { opacity: 1; visibility: visible; }

@media (max-width: 768px) {
	.ah-sidebar { transform: translateX(-100%); }
	.ah-sidebar.is-open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.2); }
	.ah-main { margin-left: 0; min-width: 0; }
	.ah-topbar__toggle { display: flex; }
	.ah-content { padding: 16px; }
	.ah-topbar { padding: 10px 16px; gap: 10px; }
	.ah-topbar__right { gap: 8px; }
	.ah-hero { flex-direction: column; }
	.ah-hero__right { display: none; }
	.ah-cta-banner { flex-direction: column; align-items: flex-start; }
	.ah-hero__title { font-size: 20px; }
	/* Keep tables from forcing the whole page wider than the viewport. */
	.ah-content, .ah-card, .ah-panel { max-width: 100%; }
}

@media (max-width: 600px) {
	.ah-services-grid { grid-template-columns: 1fr; }
	/* The "Needs Attention" label eats the narrow topbar — leave just the bell +
	   dot; the dropdown still carries the full text. */
	.ah-notif__btn-label { display: none; }
	.ah-notif__btn { padding-left: 9px; padding-right: 9px; }
	/* Anchor the notification dropdown to the screen instead of overflowing off
	   the right edge on small phones. */
	.ah-notif__dropdown { right: 0; left: auto; max-width: calc(100vw - 24px); }
}

@media (max-width: 480px) {
	.ah-content { padding: 14px 12px 32px; }
	.ah-hero__title { font-size: 18px; }
}

/* ----------------------------------------------------------
   Standalone auth pages (login, set password)
   ---------------------------------------------------------- */
.ah-auth {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	background: #EAEAED;
	box-sizing: border-box;
}

/* Brand hero panel (left) */
.ah-auth__aside {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 48px;
	color: #fff;
	/* Matches the Owner Console / Client Portal / Staff sidebar's flat navy. */
	background: #274566;
}
/* Custom sidebar background image (Owner Console → Settings → Branding) */
.ah-auth__aside::before {
	content: "";
	position: absolute; inset: var(--ahx-sidebar-bg-pad, 0); pointer-events: none;
	background-image: var(--ahx-sidebar-bg, none);
	background-size: var(--ahx-sidebar-bg-size, cover);
	background-position: var(--ahx-sidebar-bg-position, center);
	background-repeat: var(--ahx-sidebar-bg-repeat, no-repeat);
	opacity: var(--ahx-sidebar-bg-opacity, 0);
}
/* Subtle grid wash on top of the gradient */
.ah-auth__aside::after {
	content: "";
	position: absolute; inset: 0; pointer-events: none; opacity: .35;
	background-image:
		linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
	background-size: 40px 40px;
	-webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
	        mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
}
/* Soft floating glow blobs */
.ah-auth__glow {
	position: absolute; border-radius: 50%; pointer-events: none;
	filter: blur(60px); opacity: .55; z-index: 0;
}
.ah-auth__glow--1 { width: 320px; height: 320px; top: -90px; right: -70px; background: #274566; }
.ah-auth__glow--2 { width: 280px; height: 280px; bottom: -100px; left: -60px; background: #6683A1; opacity: .45; }

.ah-auth__aside-inner { position: relative; z-index: 1; max-width: 420px; width: 100%; text-align: center; }

/* Plain logo — no badge/box behind it. */
.ah-auth__logo-plain { display: block; height: 96px; max-width: 280px; margin: 0 auto 28px; object-fit: contain; }

.ah-auth__hero-title { font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 12px; color: #fff; }
.ah-auth__hero-sub { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.78); margin: 0 auto 30px; max-width: 360px; }

.ah-auth__features { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-direction: column; gap: 11px; text-align: left; max-width: 320px; }
.ah-auth__features li {
	display: flex; align-items: center; gap: 13px;
	font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,.92);
	padding: 11px 14px; border-radius: 13px;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
	transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.ah-auth__features li:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); transform: translateX(3px); }
.ah-auth__feat-ic {
	flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
	display: flex; align-items: center; justify-content: center;
	color: #c7d2fe; background: rgba(99,102,241,.28); border: 1px solid rgba(255,255,255,.14);
}

.ah-auth__trust {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 30px; font-size: 12.5px; color: rgba(255,255,255,.66);
}
.ah-auth__trust svg { color: rgba(255,255,255,.6); }

/* Form panel (right) */
.ah-auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

@media ( max-width: 860px ) {
	.ah-auth { grid-template-columns: 1fr; }
	.ah-auth__aside { padding: 40px 28px; }
	.ah-auth__hero-title { font-size: 23px; }
	.ah-auth__hero-sub { margin-bottom: 22px; }
	.ah-auth__features, .ah-auth__trust { display: none; }
}

@media ( prefers-reduced-motion: reduce ) {
	.ah-auth__features li { transition: none; }
	.ah-auth__features li:hover { transform: none; }
}

.ah-auth__card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
	padding: 36px 32px 30px;
	box-sizing: border-box;
}

.ah-auth__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.ah-auth__logo {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #6683A1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ah-auth__brand-name {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -.01em;
}

.ah-auth__title {
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 6px;
	line-height: 1.25;
}

.ah-auth__sub {
	font-size: 13.5px;
	color: #64748b;
	margin: 0 0 22px;
	line-height: 1.5;
}

.ah-auth__form .ah-form-group:last-of-type { margin-bottom: 14px; }

.ah-auth__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #475569;
	margin-bottom: 18px;
	cursor: pointer;
}

.ah-auth__foot {
	text-align: center;
	margin-top: 18px;
	font-size: 13px;
}

.ah-auth__foot a {
	color: #274566;
	text-decoration: none;
	font-weight: 600;
}

.ah-auth__foot a:hover { text-decoration: underline !important; }

/* Hide the host theme around standalone auth pages — same trick the portal
   uses, scoped via the agency-portal-page body class added by Shortcodes. */
body.agency-portal-page .ah-auth { margin: 0; }

/* ----------------------------------------------------------
   Filter tabs (Proposals, future list pages)
   ---------------------------------------------------------- */
.ah-tabs {
	display: flex;
	gap: 4px;
	background: #f1f5f9;
	border-radius: 10px;
	padding: 4px;
	margin-bottom: 16px;
	overflow-x: auto;
}

.ah-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	transition: background .12s, color .12s, box-shadow .12s;
	white-space: nowrap;
}

.ah-tab:hover { color: #0f172a; }

.ah-tab.is-active {
	background: #fff;
	color: #0f172a;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.ah-tab__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
}

.ah-tab.is-active .ah-tab__count {
	background: #274566;
	color: #fff;
}

/* ----------------------------------------------------------
   Awaiting-signature highlight card (Proposals)
   ---------------------------------------------------------- */
.ah-proposals-cta {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
	border: 1px solid #c7d2fe;
	margin-bottom: 18px;
}

.ah-proposals-cta__icon {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #274566;
	color: #fff;
	font-size: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(39,69,102,.3);
}

.ah-proposals-cta__body { flex: 1 1 auto; min-width: 0; }

.ah-proposals-cta__title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 12px;
}

.ah-proposals-cta__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ah-proposals-cta__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.ah-proposals-cta__item-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ah-proposals-cta__item-meta strong {
	font-size: 13.5px;
	color: #0f172a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ah-proposals-cta__item-meta span {
	font-size: 12px;
	color: #64748b;
	font-weight: 600;
}

@media (max-width: 600px) {
	.ah-proposals-cta { flex-direction: column; gap: 14px; }
	.ah-proposals-cta__item { flex-direction: column; align-items: flex-start; gap: 10px; }
	.ah-proposals-cta__item .ah-btn { align-self: stretch; text-align: center; }
}

/* ----------------------------------------------------------
   Team management page
   ---------------------------------------------------------- */
.ah-team-form { margin-bottom: 16px; }

.ah-card__hd-link {
	margin-left: auto;
	font-size: 12.5px;
	color: #64748b;
	text-decoration: none;
	font-weight: 600;
}
.ah-card__hd-link:hover { color: #274566; }

.ah-perm-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.ah-perm-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13px;
	color: #0f172a;
	cursor: pointer;
	transition: background .12s, border-color .12s;
}
.ah-perm-row:hover { background: #eef2ff; border-color: #c7d2fe; }
.ah-perm-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #274566;
	cursor: pointer;
}

.ah-team-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ah-team-list__item {
	border-bottom: 1px solid #e2e8f0;
}
.ah-team-list__item:last-child { border-bottom: none; }
.ah-team-list__item.is-expanded { background: #f8fafc; }

.ah-team-list__row {
	display: grid;
	grid-template-columns: 2fr 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 14px 6px;
}

.ah-team-list__person {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.ah-team-list__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(15,23,42,.06);
}

.ah-team-list__meta { min-width: 0; }

.ah-team-list__name {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 1px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ah-team-list__email {
	font-size: 12.5px;
	color: #64748b;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ah-team-list__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ah-team-list__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-end;
}

.ah-team-list__expanded {
	padding: 4px 6px 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ah-team-list__perm-form { width: 100%; }

.ah-team-list__form-actions {
	margin-top: 14px;
	display: flex;
	gap: 8px;
}

.ah-team-list__danger {
	display: flex;
	gap: 10px;
	padding-top: 14px;
	border-top: 1px dashed #e2e8f0;
}

@media (max-width: 700px) {
	.ah-perm-grid { grid-template-columns: 1fr; }
	.ah-team-list__row { grid-template-columns: 1fr; gap: 8px; }
	.ah-team-list__chips,
	.ah-team-list__actions { justify-content: flex-start; }
}

/* ----------------------------------------------------------
   New Client Profile Form (auto-prompt on dashboard)
   ---------------------------------------------------------- */
.ah-profile-form-card {
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e5e9f2;
	padding: 24px 26px;
	margin-bottom: 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.ah-profile-form-card__head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid #f1f5f9;
}
.ah-profile-form-card__icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}
.ah-profile-form-card__eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	color: #b45309;
	margin-bottom: 3px;
}
.ah-profile-form-card__title {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 4px;
}
.ah-profile-form-card__sub {
	font-size: 13.5px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}
/* Accordion behavior for the Complete-Your-Profile card */
.ah-profile-form-card__toggle {
	cursor: pointer;
	user-select: none;
	margin-bottom: 0;   /* collapsed: no divider/gap below the head */
	padding-bottom: 0;
	border-bottom: none;
}
.ah-profile-form-card__toggle:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 3px;
	border-radius: 10px;
}
.ah-profile-form-card__headtext { flex: 1; min-width: 0; }
.ah-profile-form-card__chev {
	flex-shrink: 0;
	align-self: center;
	color: #94a3b8;
	transition: transform .2s ease;
}
.ah-profile-form-card.is-open .ah-profile-form-card__toggle {
	margin-bottom: 22px;   /* open: restore the original divider */
	padding-bottom: 18px;
	border-bottom: 1px solid #f1f5f9;
}
.ah-profile-form-card.is-open .ah-profile-form-card__chev { transform: rotate(180deg); }

.ah-form-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 13.5px;
	color: #0f172a;
	padding: 10px 12px;
	background: #f8fafc;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	width: 100%;
}
.ah-form-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #274566;
	cursor: pointer;
}

.ah-profile-form__billing[hidden] { display: none; }

/* ----------------------------------------------------------
   Refer-a-Business card
   ---------------------------------------------------------- */
.ah-referral-card {
	background: #fff;
	border-radius: 14px;
	padding: 24px 26px;
	margin-bottom: 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,.05);
	border: 1px solid #e5e9f2;
}
.ah-referral-card__head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid #f1f5f9;
}
.ah-referral-card__icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #ede9fe, #c7d2fe);
	display: flex; align-items: center; justify-content: center;
	font-size: 22px;
}
.ah-referral-card__title {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 4px;
}
.ah-referral-card__sub {
	font-size: 13.5px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}
.ah-referral-card__share {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed #cbd5e1;
}
.ah-referral-card__share-label {
	font-size: 11.5px;
	font-weight: 700;
	color: #274566;
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 8px;
}
.ah-referral-card__share-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.ah-referral-card__share-row .ah-form-input {
	flex: 1;
	font-family: monospace;
	font-size: 12.5px;
	background: #f8fafc;
}
.ah-referral-card__share-hint {
	font-size: 12px;
	color: #94a3b8;
	margin: 8px 0 0;
}
/* Accordion behavior for the Refer-a-Business card */
.ah-referral-card__toggle {
	cursor: pointer;
	user-select: none;
	align-items: center;
	margin-bottom: 0; /* compact when collapsed; margin restored when open */
}
.ah-referral-card__toggle:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 3px;
	border-radius: 10px;
}
.ah-referral-card__headtext { flex: 1; min-width: 0; }
.ah-referral-card__chev {
	flex-shrink: 0;
	color: #94a3b8;
	transition: transform .2s ease;
}
.ah-referral-card.is-open .ah-referral-card__toggle { margin-bottom: 20px; }
.ah-referral-card.is-open .ah-referral-card__chev { transform: rotate(180deg); }

/* ============================================================
   View-as-client preview banner — only renders when an admin or
   staff user is impersonating a client for the preview.
   ============================================================ */
.ah-viewas-banner {
	background: #274566;
	color: #fff;
	border-bottom: 3px solid #fbbf24;
}
.ah-viewas-banner__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 24px;
	max-width: 1400px;
	margin: 0 auto;
	flex-wrap: wrap;
}
.ah-viewas-banner__icon { font-size: 18px; line-height: 1; }
.ah-viewas-banner__text { flex: 1; font-size: 13.5px; line-height: 1.4; }
.ah-viewas-banner__text strong { color: #fde68a; }
.ah-viewas-banner__hint {
	display: block;
	font-size: 11.5px;
	color: rgba(255,255,255,.72);
	margin-top: 2px;
}
.ah-viewas-banner__btn {
	background: #fbbf24;
	color: #1a1f3c;
	border: 0;
	padding: 7px 14px;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: background .14s ease;
}
.ah-viewas-banner__btn:hover { background: #fcd34d; }

/* ============================================================
   Help Desk Access Form — centered, polished branching intake
   ============================================================ */
.ah-req { color: #ef4444; font-weight: 700; }
.ah-optional { color: #94a3b8; font-weight: 400; font-size: 12px; }

/* Centered page wrapper */
.ah-helpdesk-wrap {
	display: flex;
	justify-content: center;
	padding: 8px 0 40px;
}
.ah-helpdesk-card {
	width: 100%;
	max-width: 640px;
	background: #fff;
	border: 1px solid #e7ebf3;
	border-radius: 20px;
	box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
	overflow: hidden;
}

/* Gradient hero header */
.ah-helpdesk-hero {
	text-align: center;
	padding: 34px 32px 26px;
	background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
	color: #fff;
}
.ah-helpdesk-hero__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.ah-helpdesk-hero__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.01em;
	color: #fff;
}
.ah-helpdesk-hero__intro {
	margin: 0 auto;
	max-width: 460px;
	font-size: 13.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .85);
}

/* Form body */
.ah-helpdesk-body { padding: 28px 32px 32px; }
.ah-helpdesk-body .ah-form-group { margin-bottom: 18px; }
.ah-helpdesk-body .ah-form-label {
	display: block;
	margin-bottom: 7px;
	font-size: 13.5px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.45;
}
.ah-helpdesk-body .ah-form-input {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d8dee9;
	border-radius: 10px;
	font-size: 14px;
	color: #0f172a;
	background: #fff;
	transition: border-color .14s ease, box-shadow .14s ease;
	box-sizing: border-box;
}
.ah-helpdesk-body .ah-form-input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.ah-helpdesk-body select.ah-form-input {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	padding-right: 38px;
}
.ah-helpdesk-body .ah-form-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.ah-form-hint { margin: 6px 0 0; font-size: 12px; color: #94a3b8; }

/* Conditional branch reveal */
.ah-hd-branch {
	margin: 4px 0 0;
	animation: ahHdFade .18s ease;
}
.ah-hd-branch[hidden] { display: none; }
@keyframes ahHdFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Section divider with centered label */
.ah-hd-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 24px 0 18px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.ah-hd-divider::before,
.ah-hd-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e7ebf3;
}

/* Multi-select checkbox chips */
.ah-checkrow {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 2px 0;
}
.ah-checkrow__item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px solid #d8dee9;
	border-radius: 999px;
	font-size: 13px;
	color: #334155;
	cursor: pointer;
	transition: border-color .12s ease, background .12s ease;
}
.ah-checkrow__item:hover { border-color: #93c5fd; background: #f5f9ff; }
.ah-checkrow__item input { margin: 0; accent-color: #2563eb; }

/* Actions */
.ah-helpdesk-actions { margin-top: 22px; text-align: center; }
.ah-btn--block { display: block; width: 100%; text-align: center; padding: 13px 20px; font-size: 15px; border-radius: 11px; }
.ah-helpdesk-cancel {
	display: inline-block;
	margin-top: 12px;
	font-size: 13px;
	color: #64748b;
	text-decoration: none;
}
.ah-helpdesk-cancel:hover { color: #1e293b; text-decoration: underline !important; }

@media (max-width: 560px) {
	.ah-helpdesk-hero { padding: 26px 20px 22px; }
	.ah-helpdesk-body { padding: 22px 20px 26px; }
}


/* ============================================================
   Profile photo upload field (shared: ahx- neutral classes)
   ============================================================ */
.ahx-avatar-field { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ahx-avatar-field__preview img,
.ahx-avatar-field__preview .avatar {
	width: 72px !important; height: 72px !important; border-radius: 50% !important; object-fit: cover;
	border: 2px solid #e2e8f0; display: block; padding: 0 !important; max-width: none !important;
}
.ahx-avatar-field__controls { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ahx-avatar-field__label { display: inline-block; cursor: pointer; margin: 0; }
.ahx-avatar-field__btn {
	display: inline-block; padding: 8px 16px; border-radius: 8px;
	background: #eef2ff; color: #274566; font-size: 13px; font-weight: 600;
	border: 1px solid #e0e7ff; transition: background .14s ease;
}
.ahx-avatar-field__label:hover .ahx-avatar-field__btn { background: #e0e7ff; }
/* Hide the native file input even when a blanket `.ahs-form-row input` /
   `.ah-form-group input` rule (full-width, bordered) would otherwise show it. */
.ahx-avatar-field__input {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; overflow: hidden;
}
.ahx-avatar-field__hint { margin: 0; font-size: 12px; color: #94a3b8; }
.ahx-avatar-field__remove { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #64748b; cursor: pointer; margin: 0; }
.ahx-avatar-field__remove input[type="checkbox"] {
	width: 16px !important; height: 16px !important; min-width: 0 !important;
	margin: 0 !important; padding: 0 !important; flex: none; display: inline-block; box-shadow: none;
}

/* Brand logo/favicon variant: rectangular "contain" preview instead of the
   circular avatar crop above (these are wordmarks/icons, not headshots). */
.ahx-avatar-field--brand .ahx-avatar-field__preview img {
	width: auto !important; height: 48px !important; max-width: 170px !important;
	border-radius: 8px !important; object-fit: contain !important; padding: 6px !important;
	border: 1px solid #e2e8f0 !important;
}
.ahx-avatar-field--logo-light .ahx-avatar-field__preview img { background: #0f1530 !important; }
.ahx-avatar-field--logo-dark  .ahx-avatar-field__preview img { background: #fff !important; }
.ahx-avatar-field--favicon .ahx-avatar-field__preview img {
	width: 32px !important; height: 32px !important; max-width: none !important;
	border-radius: 6px !important; padding: 0 !important; background: transparent !important;
}
.ahx-avatar-field__filename { margin: 0; font-size: 12px; color: #475569; font-weight: 600; }
/* The unconditional `display` rules above (and `.ahx-avatar-field__remove`'s
   inline-flex) otherwise beat the plain `hidden` attribute in the cascade. */
.ahx-avatar-field__preview img[hidden],
.ahx-avatar-field__remove[hidden],
.ahx-avatar-field__filename[hidden],
.ahx-logowidth-field__img[hidden] { display: none !important; }

/* Sidebar background image: tall navy stage with a CSS-background layer, so
   the size/position/repeat/opacity controls preview exactly how they'll
   actually render in the app (an <img> can't preview those properties). */
.ahx-bgfield { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.ahx-bgfield__stage {
	width: 96px; height: 150px; flex: none; border-radius: 10px; overflow: hidden;
	background: #0f1530; border: 1px solid #e2e8f0; position: relative;
}
.ahx-bgfield__layer { position: absolute; inset: 0; background-repeat: no-repeat; }
.ahx-select-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ahx-select-row__item { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #64748b; font-weight: 600; }
.ahx-select-row__item select { min-width: 150px; }
.ahx-opacity-field, .ahx-slider-field { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ahx-opacity-field__label, .ahx-slider-field__label { font-size: 12.5px; color: #64748b; font-weight: 600; min-width: 42px; }
.ahx-opacity-field__slider, .ahx-slider-field__slider { width: 140px; accent-color: #274566; }
.ahx-opacity-field__value, .ahx-slider-field__value { font-size: 12.5px; color: #475569; font-weight: 700; min-width: 40px; }

/* Sidebar logo width: mini navy "stage" at the sidebar's real content width
   (208px) so the slider previews true to how it'll actually render. */
.ahx-logowidth-field { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ahx-logowidth-field__stage {
	width: 208px; max-width: 100%; box-sizing: border-box; padding: 14px;
	border-radius: 10px; background: #274566; border: 1px solid #e2e8f0;
	display: flex; align-items: center; min-height: 40px;
}
.ahx-logowidth-field__img { display: block; height: auto; max-width: 100%; object-fit: contain; }

/* ============================================================
   Brand typography + navy sidebar texture (1.png / 2.png match)
   ============================================================ */
.ah-wrap, .ah-wrap input, .ah-wrap select, .ah-wrap textarea, .ah-wrap button {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.ah-wrap { -webkit-font-smoothing: antialiased; }

/* Subtle topographic contour texture behind the navy sidebar.
   NOTE: .ah-sidebar is already position:fixed — do NOT override it here, or the
   main column's margin-left offset doubles up and leaves a phantom gap. */
.ah-sidebar::before {
	content: "";
	position: absolute;
	inset: var(--ahx-sidebar-bg-pad, 0);
	pointer-events: none;
	z-index: 0;
	background-image: var(--ahx-sidebar-bg, none);
	background-size: var(--ahx-sidebar-bg-size, cover);
	background-position: var(--ahx-sidebar-bg-position, center);
	background-repeat: var(--ahx-sidebar-bg-repeat, no-repeat);
	opacity: var(--ahx-sidebar-bg-opacity, 0);
}
.ah-sidebar > * { position: relative; z-index: 1; }

/* Sidebar brand: role tag under the name */
.ah-sidebar__logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.ah-sidebar__logo-tag { font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 3px; }

/* =========================================================================
   Portal Help & Guide — in-product client documentation
   (mirrors the .aha-doc styles from the console so the guide renders
    identically inside the portal, which loads only portal.css)
   ========================================================================= */

.aha-doc { width: 100%; max-width: 1120px; margin: 0 auto; color: #334155; font-size: 15px; line-height: 1.65; }

.aha-doc__hero {
	position: relative; overflow: hidden;
	border-radius: 20px; padding: 38px 34px; color: #fff; margin-bottom: 26px;
	background:
		radial-gradient(120% 120% at 12% 0%, #274566 0%, rgba(39,69,102,0) 55%),
		linear-gradient(150deg, #111a3f 0%, #1c3450 50%, #274566 100%);
	box-shadow: 0 18px 44px rgba(31, 41, 99, .26);
}
.aha-doc__hero-glow { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.aha-doc__hero-glow--1 { width: 280px; height: 280px; top: -90px; right: -60px; background: #6683A1; opacity: .5; }
.aha-doc__hero-glow--2 { width: 240px; height: 240px; bottom: -110px; left: -40px; background: #274566; opacity: .4; }
.aha-doc__hero-inner { position: relative; z-index: 1; }
.aha-doc__hero-badge {
	display: inline-block; margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
	padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
}
.aha-doc__hero-title { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: #fff; line-height: 1.15; }
.aha-doc__hero-sub { margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.85); max-width: 640px; }
.aha-doc__hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.aha-doc-pill { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #eef2ff; }

.aha-doc__toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 30px; }
.aha-doc__toc-item {
	display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 13px; text-decoration: none;
	background: #fff; border: 1px solid #e6e9f5; color: #1a1f3c; font-weight: 600; font-size: 14px;
	transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.aha-doc__toc-item:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(39,69,102,.12); color: #4338ca; }
.aha-doc__toc-num {
	flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 800; color: #4338ca; background: linear-gradient(135deg, #eef2ff, #e0e7ff); border: 1px solid #e0e7ff;
}

.aha-doc__section {
	background: #fff; border: 1px solid #e9ecf6; border-radius: 18px; padding: 26px 28px; margin-bottom: 18px;
	scroll-margin-top: 20px; box-shadow: 0 2px 10px rgba(31,41,99,.04);
}
.aha-doc__section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.aha-doc__icon {
	flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff;
	background: #274566; box-shadow: 0 8px 18px rgba(39,69,102,.32);
}
.aha-doc__h { margin: 2px 0 2px; font-size: 19px; font-weight: 800; color: #14183a; letter-spacing: -.01em; }
.aha-doc__lead { margin: 0; font-size: 14px; color: #64748b; }
.aha-doc__p { margin: 0 0 12px; }
.aha-doc__p:last-child { margin-bottom: 0; }

.aha-doc__steps { counter-reset: ahastep; list-style: none; margin: 6px 0 4px; padding: 0; }
.aha-doc__steps li { position: relative; padding: 4px 0 14px 44px; margin: 0; }
.aha-doc__steps li::before {
	counter-increment: ahastep; content: counter(ahastep); position: absolute; left: 0; top: 2px;
	width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #274566, #6683A1); box-shadow: 0 4px 10px rgba(39,69,102,.3);
}
.aha-doc__steps li::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: linear-gradient(#dfe3f3, transparent); }
.aha-doc__steps li:last-child::after { display: none; }

.aha-doc__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 6px 0 4px; }
.aha-doc-card { background: linear-gradient(160deg, #fbfcff, #f5f7ff); border: 1px solid #e9ecf8; border-radius: 13px; padding: 15px 16px; }
.aha-doc-card__t { font-size: 14.5px; font-weight: 800; color: #1a1f3c; margin-bottom: 5px; }
.aha-doc-card__d { font-size: 13.5px; color: #5b6478; line-height: 1.55; }
.aha-doc-role { display: inline-block; font-size: 13px; font-weight: 700; color: #4338ca; padding: 3px 10px; border-radius: 999px; background: #eef2ff; border: 1px solid #e0e7ff; }

.aha-doc__tip {
	margin: 14px 0 2px; padding: 13px 16px; border-radius: 12px; font-size: 14px; color: #3730a3; line-height: 1.55;
	background: #eef2ff; border: 1px solid #dfe3fb; border-left: 4px solid #274566;
}
.aha-doc__tip strong { color: #312e81; }
.aha-doc__tip--warn { color: #92400e; background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.aha-doc__tip--warn strong { color: #78350f; }

.aha-doc__q { font-weight: 700; color: #14183a; margin-top: 12px; }
.aha-doc__q:first-child { margin-top: 0; }
.aha-doc__a { margin: 3px 0 0; color: #5b6478; }

.aha-doc__foot { margin-top: 24px; text-align: center; font-size: 14px; color: #64748b; padding: 18px; border-top: 1px dashed #dfe3f3; }

@media ( prefers-reduced-motion: reduce ) {
	.aha-doc__toc-item { transition: none; }
	.aha-doc__toc-item:hover { transform: none; }
}

/* =========================================================================
   Help Desk v2 — multi-file drag & drop attachment uploader
   ========================================================================= */
.ah-hd-dropzone {
	border: 2px dashed #cbd5e1; border-radius: 12px; padding: 20px; text-align: center;
	background: #f8fafc; transition: border-color .12s ease, background .12s ease; cursor: pointer;
}
.ah-hd-dropzone.is-drag { border-color: #2563eb; background: #eff6ff; }
.ah-hd-dropzone__icon { font-size: 22px; display: block; margin-bottom: 6px; }
.ah-hd-dropzone__text { margin: 0; font-size: 14px; color: #475569; }
.ah-hd-browse { background: none; border: 0; color: #2563eb; font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.ah-hd-tray { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ah-hd-chip {
	display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #e2e8f0;
	border-radius: 10px; background: #fff; max-width: 260px;
}
.ah-hd-chip__thumb {
	width: 34px; height: 34px; flex: none; border-radius: 7px; background: #f1f5f9;
	display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 16px;
}
.ah-hd-chip__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-hd-chip__meta { display: flex; flex-direction: column; min-width: 0; }
.ah-hd-chip__name { font-size: 12.5px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.ah-hd-chip__size { font-size: 11px; color: #94a3b8; }
.ah-hd-chip__remove { margin-left: 2px; background: none; border: 0; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ah-hd-chip__remove:hover { color: #dc2626; }
.ah-hd-cloud { margin-top: 12px; padding: 12px 14px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; }
.ah-hd-cloud__msg { margin: 0 0 8px; font-size: 13.5px; color: #92400e; }
.ah-hd-cloud__buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* Hub v2 guide — sub-headings + bullet lists inside .aha-doc sections */
.aha-doc__h3 { font-size: 15px; font-weight: 700; color: #1e293b; margin: 22px 0 6px; }
.aha-doc__list { margin: 8px 0; padding-left: 20px; color: #334155; line-height: 1.6; font-size: 15px; }
.aha-doc__list li { margin: 5px 0; }
