/* ==========================================================================
   Avir Client Portal — client-facing styles (login + dashboard)
   Works inside the theme, and as a full-screen 100%-width app (body.ahp-app-body).
   ========================================================================== */

.ahp-portal, .ahp-auth, .ahp-authapp {
	--ahp-teal: var(--ahp-brand-600);
	--ahp-ink: #13222a;
	--ahp-muted: #5f6f78;
	--ahp-line: #e3e9ec;
	--ahp-bg: #f3f6f7;
	--ahp-card: #ffffff;
	color: var(--ahp-ink);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.ahp-portal *, .ahp-auth *, .ahp-authapp * { box-sizing: border-box; }
.ahp-portal a, .ahp-auth a, .ahp-authapp a { color: var(--ahp-brand-600); }
.ahp-portal h2, .ahp-portal h3, .ahp-portal h4, .ahp-auth h2, .ahp-authapp h1 { color: var(--ahp-ink); margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.ahp-muted { color: var(--ahp-muted); }
.ahp-pos { color: var(--ahp-accent) !important; }
.ahp-neg { color: var(--ahp-red) !important; }
.ahp-icon { flex-shrink: 0; }
.ahp-link { font-weight: 600; text-decoration: none !important; display: inline-flex; align-items: center; gap: 4px; }
.ahp-link:hover { text-decoration: underline !important; }
.ahp-btn--primary { --_bg: var(--ahp-brand-600); }
.ahp-only-mobile { display: none !important; }

/* Brand mark (logo) */
.ahp-brandmark { display: inline-flex; align-items: center; text-decoration: none !important; }
.ahp-brandmark img { display: block; max-height: 44px; width: auto; max-width: 180px; object-fit: contain; }
.ahp-brandmark__text { font-weight: 800; font-size: 18px; color: var(--ahp-ink); }
.ahp-brandmark--light img { max-height: 56px; background: #fff; padding: 8px 12px; border-radius: 12px; }
.ahp-brandmark--light .ahp-brandmark__text { color: #fff; }

/* Alerts + badges */
.ahp-alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.ahp-alert--error { background: var(--ahp-red-50); color: #8a1218; }
.ahp-alert--success { background: var(--ahp-accent-50); color: #0e5f31; }
.ahp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle; background: #eef1f3; color: #4a5960; }
.ahp-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ahp-badge--completed, .ahp-badge--verified, .ahp-badge--received { background: var(--ahp-accent-50); color: #0e6b37; }
.ahp-badge--in_progress, .ahp-badge--submitted { background: var(--ahp-amber-50); color: #94530a; }
.ahp-badge--pending, .ahp-badge--uploaded { background: var(--ahp-blue-50); color: #1e48b8; }
.ahp-badge--blocked, .ahp-badge--rejected, .ahp-badge--cancelled { background: var(--ahp-red-50); color: #a3161c; }

/* ===================== Full-screen app body ===================== */
body.ahp-app-body { margin: 0 !important; padding: 0 !important; background: var(--ahp-bg, #f3f6f7) !important; min-height: 100vh; }
body.ahp-app-body #page, body.ahp-app-body .site { display: contents; }

/* ===================== Login ===================== */
.ahp-auth { display: flex; justify-content: center; padding: 48px 16px; background: var(--ahp-bg); }
.ahp-auth__card { width: 100%; max-width: 440px; background: var(--ahp-card); border-radius: 18px; padding: 34px 30px; box-shadow: 0 20px 50px -20px rgba(11, 92, 92, .3); border-top: 5px solid var(--ahp-brand-600); animation: ahp-fade-up .5s var(--ahp-ease) both; }
.ahp-auth__brand { text-align: center; margin-bottom: 22px; }
.ahp-auth__brand img { max-height: 56px; width: auto; margin-bottom: 10px; }
.ahp-auth__brand h2 { font-size: 26px; }
.ahp-auth__brand p { color: var(--ahp-muted); margin: 6px 0 0; }
.ahp-auth__form label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.ahp-auth__form input[type=text], .ahp-auth__form input[type=password], .ahp-form input[type=password] {
	width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid #cfd9dd; border-radius: 11px; font-size: 15px; background: #fff; color: var(--ahp-ink); box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.ahp-auth__form input:focus, .ahp-form input:focus { outline: none; border-color: var(--ahp-brand-500); box-shadow: var(--ahp-ring); }
.ahp-pass { position: relative; }
.ahp-pass input { padding-right: 74px !important; }
.ahp-pass__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent !important; border: 0 !important; color: var(--ahp-brand-600) !important; font-weight: 700; font-size: 13px; cursor: pointer; padding: 8px 10px !important; box-shadow: none !important; min-height: 0 !important; }
.ahp-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 4px; font-size: 14px; flex-wrap: wrap; }
.ahp-check { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 500 !important; margin: 0 !important; }
.ahp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ahp-auth__help { text-align: center; font-size: 14px; color: var(--ahp-muted); margin: 18px 0 0; }
.ahp-auth__signed { text-align: center; }
.ahp-auth .ahp-btn--block { margin-top: 14px; min-height: 48px; font-size: 15px; }

/* Split-screen login (full-screen mode) */
.ahp-authapp { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; background: #fff; }
.ahp-authapp__brand {
	position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 52px;
	color: #fff; background: radial-gradient(1200px 600px at -10% -20%, rgba(52, 194, 122, .35), transparent 60%), linear-gradient(150deg, #0a5150 0%, #0b6564 45%, #10806b 100%);
}
.ahp-authapp__brand::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); }
.ahp-authapp__pitch { position: relative; z-index: 1; max-width: 480px; animation: ahp-fade-up .6s var(--ahp-ease) both; }
.ahp-authapp__pitch h1 { color: #fff !important; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin-bottom: 14px; }
.ahp-authapp__pitch p { color: rgba(255, 255, 255, .85); font-size: 16px; margin: 0 0 26px; }
.ahp-authapp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ahp-authapp__list li { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; color: #fff; }
.ahp-authapp__list li span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.ahp-authapp__back { position: relative; z-index: 1; color: rgba(255, 255, 255, .85) !important; text-decoration: none !important; font-weight: 600; }
.ahp-authapp__back:hover { color: #fff !important; }
.ahp-authapp__main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 20px; background: var(--ahp-bg); }
.ahp-authapp__mobilebrand { display: none; }
.ahp-auth--app { padding: 0; background: transparent; width: 100%; }
.ahp-auth--app .ahp-auth__card { border-top: 0; box-shadow: 0 1px 3px rgba(16, 35, 45, .06), 0 20px 50px -24px rgba(16, 35, 45, .25); }
.ahp-auth--app .ahp-auth__brand { text-align: left; }
@media (max-width: 900px) {
	.ahp-authapp { grid-template-columns: 1fr; }
	.ahp-authapp__brand { display: none; }
	.ahp-authapp__main { justify-content: flex-start; padding: 0 16px 32px; min-height: 100vh; }
	.ahp-authapp__mobilebrand { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 440px; padding: 18px 0 22px; }
	.ahp-authapp__mobilebrand > a:last-child { font-weight: 600; font-size: 14px; text-decoration: none; }
	.ahp-auth__card { padding: 26px 20px; }
}

/* ===================== Portal layout ===================== */
.ahp-portal { background: var(--ahp-bg); padding: 20px; border-radius: 18px; max-width: 1400px; margin: 0 auto; }
.ahp-portal--app { max-width: none; margin: 0; padding: 0; border-radius: 0; min-height: 100vh; }
.ahp-portal--message { max-width: 640px; }
.ahp-preview-banner { background: #fff7e0; border-bottom: 1px solid #f3d27a; padding: 10px 20px; font-size: 14px; text-align: center; }
.ahp-portal:not(.ahp-portal--app) .ahp-preview-banner { border: 1px solid #f3d27a; border-radius: 10px; margin-bottom: 16px; }

.ahp-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; min-width: 0; }
.ahp-portal--app .ahp-layout { gap: 0; min-height: 100vh; }
.ahp-appmain { min-width: 0; display: flex; flex-direction: column; }

/* Sidebar */
.ahp-side { background: var(--ahp-card); border-radius: 14px; padding: 16px; position: sticky; top: 20px; box-shadow: var(--ahp-shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.ahp-portal--app .ahp-side { border-radius: 0; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px; border-right: 1px solid var(--ahp-line); box-shadow: none; }
.ahp-side__brand { padding: 0 6px 18px; margin-bottom: 4px; border-bottom: 1px solid var(--ahp-line); }
.ahp-portal:not(.ahp-portal--app) .ahp-side__brand { display: none; }
.ahp-side__client { display: flex; gap: 10px; align-items: center; padding: 12px 6px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--ahp-line); }
.ahp-side__client strong { display: block; font-size: 14px; line-height: 1.3; }
.ahp-side__client span { font-size: 12px; color: var(--ahp-muted); }
.ahp-avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--ahp-brand-600), var(--ahp-accent)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.ahp-avatar--sm { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; }
.ahp-side__nav { display: flex; flex-direction: column; gap: 2px; }
.ahp-side__link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #34474f !important; text-decoration: none !important; font-weight: 600; font-size: 14.5px; transition: background-color .15s, color .15s, transform .15s var(--ahp-ease); }
.ahp-side__link:hover { background: var(--ahp-bg); }
.ahp-side__link:not(.is-active):hover { transform: translateX(3px); }
.ahp-side__link.is-active { background: var(--ahp-brand-600); color: #fff !important; box-shadow: 0 8px 18px -10px rgba(11, 101, 100, .8); }
.ahp-side__website { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: auto; color: var(--ahp-muted) !important; text-decoration: none !important; font-size: 13.5px; font-weight: 600; }
.ahp-portal:not(.ahp-portal--app) .ahp-side__website { display: none; }
.ahp-side__help { display: flex; gap: 10px; width: 100%; margin-top: 10px; padding: 12px; border: 0; background: var(--ahp-accent-50); border-radius: 10px; font: inherit; font-size: 13px; color: #0e5f31; text-align: left; cursor: pointer; transition: transform .15s var(--ahp-ease), box-shadow .15s; }
.ahp-side__help:hover { transform: translateY(-2px); box-shadow: var(--ahp-shadow-md); }
.ahp-side__help strong, .ahp-side__help span { display: block; }
.ahp-side__help span { font-weight: 700; word-break: break-word; }

/* Top bar */
.ahp-ptopbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; margin-bottom: 18px; background: var(--ahp-card); border-radius: 12px; box-shadow: var(--ahp-shadow-sm); }
.ahp-portal--app .ahp-ptopbar { position: sticky; top: 0; z-index: 30; margin: 0; border-radius: 0; padding: 12px 28px; border-bottom: 1px solid var(--ahp-line); box-shadow: none; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(10px); }
.ahp-ptopbar__title strong { display: block; font-size: 15px; line-height: 1.2; }
.ahp-ptopbar__title span { font-size: 12px; color: var(--ahp-muted); }
.ahp-ptopbar__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ahp-ptopbar__logo .ahp-brandmark img { max-height: 34px; }
.ahp-portal .ahp-btn--ghost { --_fg: var(--ahp-ink); }
.ahp-bell { position: relative; overflow: visible !important; }
/* Sit the unread badge on the bell glyph's top-right so it reads as one unit. */
.ahp-bell .ahp-count { top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 1; box-shadow: 0 0 0 2px #fff; animation: ahp-pop .4s var(--ahp-ease) both; }
.ahp-ptopbar__actions .ahp-bell { width: 40px; height: 40px; }
.ahp-puser { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; margin-left: 4px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.ahp-puser > .ahp-icon { transform: rotate(90deg); color: var(--ahp-muted); }

.ahp-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ahp-portal--app .ahp-main { padding: 28px; }
.ahp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ahp-head h2 { font-size: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ahp-head p { margin: 4px 0 0; color: var(--ahp-muted); }
.ahp-head__meta { text-align: right; font-size: 13px; color: var(--ahp-muted); }
.ahp-head__meta strong { color: var(--ahp-ink); }
.ahp-back { font-weight: 600; text-decoration: none !important; font-size: 14px; }

.ahp-card { background: var(--ahp-card); border-radius: 14px; padding: 20px 22px; border: 1px solid var(--ahp-line); box-shadow: var(--ahp-shadow-sm); transition: box-shadow .2s var(--ahp-ease), transform .2s var(--ahp-ease); }
.ahp-card__title { font-size: 16px !important; margin-bottom: 14px !important; }
.ahp-section-title { font-size: 18px !important; margin: 4px 0 12px !important; }
.ahp-eyebrow { display: block; text-transform: uppercase; letter-spacing: .07em; font-size: 11px; font-weight: 800; color: var(--ahp-muted); margin-bottom: 6px; }
.ahp-empty { text-align: center; color: var(--ahp-muted); padding: 40px 20px; }

/* Stats */
.ahp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ahp-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ahp-stat { display: flex; align-items: center; gap: 14px; background: var(--ahp-card); border: 1px solid var(--ahp-line); border-radius: 14px; padding: 18px; box-shadow: var(--ahp-shadow-sm); transition: box-shadow .2s var(--ahp-ease), transform .2s var(--ahp-ease); }
.ahp-stat:hover { transform: translateY(-2px); box-shadow: var(--ahp-shadow-md); }
.ahp-stat__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.ahp-stat__label { display: block; font-size: 13px; color: var(--ahp-muted); font-weight: 600; }
.ahp-stat__value { display: block; font-size: 26px; line-height: 1.15; font-weight: 800; }
.ahp-stat--blue .ahp-stat__icon { background: var(--ahp-blue-50); color: var(--ahp-blue); }
.ahp-stat--green .ahp-stat__icon { background: var(--ahp-accent-50); color: var(--ahp-accent); }
.ahp-stat--amber .ahp-stat__icon { background: var(--ahp-amber-50); color: var(--ahp-amber); }
.ahp-stat--red .ahp-stat__icon { background: var(--ahp-red-50); color: var(--ahp-red); }

/* Grids */
.ahp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ahp-grid--stack { grid-template-columns: minmax(0, 1fr); }
.ahp-grid--stack .ahp-grid__side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.ahp-grid__main, .ahp-grid__side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Project card + funnel */
.ahp-project:hover { box-shadow: var(--ahp-shadow-md); }
.ahp-project__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.ahp-project__head h4 { font-size: 17px; }
.ahp-project__head .ahp-muted { font-size: 13px; }
.ahp-project__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.ahp-project__progress { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; font-size: 13px; color: var(--ahp-muted); }
.ahp-project__progress .ahp-progress { flex: 1; max-width: 320px; }
.ahp-project__progress--top { margin-bottom: 18px; }
.ahp-progress { height: 8px; background: #e6eef0; border-radius: 999px; overflow: hidden; }
.ahp-progress__bar { height: 100%; background: linear-gradient(90deg, var(--ahp-brand-600), var(--ahp-grad-end, #34c27a)); border-radius: 999px; transform-origin: left; animation: ahp-grow-x 1s var(--ahp-ease) both; }

.ahp-funnel-wrap { overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ahp-funnel { display: flex; list-style: none; margin: 0; padding: 0; min-width: max-content; width: 100%; }
.ahp-funnel__step { position: relative; flex: 1 0 104px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; margin: 0 !important; list-style: none; animation: ahp-fade-up .45s var(--ahp-ease) both; }
.ahp-funnel__step:nth-child(2) { animation-delay: .05s; } .ahp-funnel__step:nth-child(3) { animation-delay: .1s; } .ahp-funnel__step:nth-child(4) { animation-delay: .15s; }
.ahp-funnel__step:nth-child(5) { animation-delay: .2s; } .ahp-funnel__step:nth-child(6) { animation-delay: .25s; } .ahp-funnel__step:nth-child(n+7) { animation-delay: .3s; }
.ahp-funnel__step::before { content: ''; position: absolute; top: 17px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 3px; background: #dbe3e6; border-radius: 3px; }
.ahp-funnel__step:first-child::before { display: none; }
.ahp-funnel__step.is-done::before, .ahp-funnel__step.is-current::before { background: var(--ahp-accent); }
.ahp-funnel__dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: #fff; border: 3px solid #cfd9dd; color: #7a8a92; position: relative; z-index: 1; }
.ahp-funnel__step.is-done .ahp-funnel__dot { background: var(--ahp-accent); border-color: var(--ahp-accent); color: #fff; }
.ahp-funnel__step.is-current .ahp-funnel__dot { background: var(--ahp-blue); border-color: #bcd0fb; color: #fff; animation: ahp-pulse 2s infinite; }
.ahp-funnel__step.is-blocked .ahp-funnel__dot { background: var(--ahp-red); border-color: #f5b5b8; color: #fff; }
.ahp-funnel__name { margin-top: 8px; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--ahp-ink); }
.ahp-funnel__state { font-size: 11.5px; color: var(--ahp-muted); margin-top: 2px; }
.ahp-funnel__step.is-done .ahp-funnel__state { color: var(--ahp-accent); }
.ahp-funnel__step.is-current .ahp-funnel__state { color: var(--ahp-blue); font-weight: 700; }
.ahp-funnel__step.is-blocked .ahp-funnel__state { color: var(--ahp-red); font-weight: 700; }
.ahp-funnel__date { font-size: 11px; color: #8a979e; }

/* Side cards */
.ahp-next { border-left: 4px solid var(--ahp-blue); }
.ahp-next strong { display: block; font-size: 17px; margin-bottom: 4px; }
.ahp-next .ahp-muted { display: block; font-size: 13px; margin-bottom: 12px; }
.ahp-contact__row { display: flex; gap: 10px; align-items: center; }
.ahp-contact__row strong, .ahp-contact__row a { display: block; font-size: 14px; }

/* Timeline */
.ahp-timeline { list-style: none; margin: 0; padding: 0; }
.ahp-timeline li { position: relative; padding: 0 0 14px 18px; margin: 0; border-left: 2px solid #d5e7dd; }
.ahp-timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ahp-accent); }
.ahp-timeline li:last-child { padding-bottom: 0; }
.ahp-timeline__date { font-size: 12px; color: var(--ahp-muted); }
.ahp-timeline p { margin: 2px 0 0; font-size: 14px; }
.ahp-timeline--compact p { font-size: 13px; }

/* Step list */
.ahp-steplist { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.ahp-steplist li { counter-increment: s; position: relative; padding: 12px 0 12px 42px; border-bottom: 1px solid var(--ahp-line); margin: 0; }
.ahp-steplist li:last-child { border-bottom: 0; }
.ahp-steplist li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: #eef2f4; color: #5f6f78; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ahp-steplist li.is-completed::before { content: '✓'; background: var(--ahp-accent); color: #fff; }
.ahp-steplist li.is-in_progress::before { background: var(--ahp-blue); color: #fff; }
.ahp-steplist li.is-blocked::before { background: var(--ahp-red); color: #fff; }
.ahp-steplist__head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ahp-steplist .ahp-muted { font-size: 13px; }
.ahp-steplist p { margin: 4px 0 0; font-size: 14px; }
.ahp-steplist__note { background: var(--ahp-bg); border-radius: 8px; padding: 6px 10px; }

/* Definition lists */
.ahp-kv { margin: 0; }
.ahp-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ahp-line); }
.ahp-kv > div:last-child { border-bottom: 0; }
.ahp-kv dt { color: var(--ahp-muted); font-size: 14px; }
.ahp-kv dd { margin: 0; font-weight: 700; text-align: right; font-size: 14px; }
.ahp-kv--wide dd { max-width: 65%; }
.ahp-dl { margin: 0; }
.ahp-dl__heading { font-weight: 800; color: var(--ahp-brand-600); margin: 16px 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--ahp-accent-50); }
.ahp-dl__heading:first-child { margin-top: 0; }
.ahp-dl__row { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ahp-line); }
.ahp-dl__row dt { color: var(--ahp-muted); font-size: 14px; }
.ahp-dl__row dd { margin: 0; font-weight: 600; font-size: 14px; word-break: break-word; }
.ahp-mini-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ahp-mini-table th, .ahp-mini-table td { border: 1px solid var(--ahp-line); padding: 4px 8px; text-align: left; }

/* Documents + tables */
.ahp-doclist { list-style: none; margin: 0; padding: 0; }
.ahp-doclist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--ahp-line); margin: 0; }
.ahp-doclist li:last-child { border-bottom: 0; }
.ahp-doclist a { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; text-decoration: none !important; min-width: 0; }
.ahp-doclist a span { overflow: hidden; text-overflow: ellipsis; }
.ahp-table-wrap { overflow-x: auto; }
.ahp-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.ahp-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ahp-muted); padding: 8px 10px; border-bottom: 2px solid var(--ahp-line); background: transparent; }
.ahp-table td { padding: 11px 10px; border-bottom: 1px solid var(--ahp-line); vertical-align: middle; background: transparent; }
.ahp-paysum { margin: 0 0 12px; font-size: 14px; }
.ahp-form label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }

/* Drawers (portal) */
.ahp-portal-drawer .ahp-side__client { margin-bottom: 12px; }
.ahp-drawer .ahp-side__nav { display: flex; flex-direction: column; gap: 2px; }
.ahp-drawer .ahp-side__link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--ahp-gray-700) !important; text-decoration: none !important; font-weight: 600; font-size: 15px; }
.ahp-drawer .ahp-side__link.is-active { background: var(--ahp-brand-600); color: #fff !important; }
.ahp-drawer .ahp-side__client { display: flex; gap: 10px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--ahp-gray-200); }
.ahp-drawer .ahp-side__client strong { display: block; }
.ahp-drawer .ahp-side__client span { font-size: 12px; color: var(--ahp-gray-500); }
.ahp-drawer .ahp-avatar { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--ahp-brand-600), var(--ahp-accent)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.ahp-notes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ahp-notes li { margin: 0; }
.ahp-notes a { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--ahp-gray-200); border-radius: var(--ahp-radius); color: inherit !important; text-decoration: none !important; height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s var(--ahp-ease); }
.ahp-notes a:hover { border-color: var(--ahp-brand-200); box-shadow: var(--ahp-shadow-md); transform: translateY(-2px); }
.ahp-notes__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--ahp-brand-50); color: var(--ahp-brand-600); }
.ahp-notes strong { display: block; font-size: 14px; color: var(--ahp-gray-900); }
.ahp-notes p { margin: 2px 0 4px; font-size: 13px; color: var(--ahp-gray-700); }
.ahp-notes small { font-size: 12px; color: var(--ahp-gray-500); }
.ahp-help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding-bottom: 8px; }
.ahp-help-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--ahp-gray-200); border-radius: var(--ahp-radius); }
.ahp-help-card > div { flex: 1; min-width: 0; }
.ahp-help-card strong { display: block; font-size: 14px; overflow-wrap: anywhere; word-break: normal; }
.ahp-help-card small { color: var(--ahp-gray-500); font-size: 12px; }
.ahp-preview { padding: 0 !important; background: #525659; display: flex; }
.ahp-preview iframe { width: 100%; min-height: 100%; flex: 1; border: 0; background: #fff; }
.ahp-preview img { max-width: 100%; margin: auto; display: block; padding: 16px; }

/* ===================== Responsive ===================== */
@media (max-width: 1200px) {
	.ahp-grid { grid-template-columns: minmax(0, 1fr); }
	.ahp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.ahp-only-mobile { display: inline-flex !important; }
	.ahp-portal { padding: 12px; border-radius: 0; }
	.ahp-portal--app { padding: 0; }
	.ahp-layout { grid-template-columns: minmax(0, 1fr); }
	.ahp-side { display: none; }
	.ahp-puser__name, .ahp-ptopbar__title { display: none; }
	.ahp-ptopbar { position: sticky; top: 0; z-index: 30; margin: -12px -12px 14px; border-radius: 0; padding: 8px 10px; }
	.ahp-portal--app .ahp-ptopbar { margin: 0; padding: 8px 12px; }
	.ahp-portal--app .ahp-main { padding: 16px; }
}
@media (max-width: 600px) {
	.ahp-stats, .ahp-stats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ahp-stats--3 .ahp-stat:last-child { grid-column: 1 / -1; }
	.ahp-stat { padding: 12px; gap: 10px; }
	.ahp-stat__icon { width: 36px; height: 36px; }
	.ahp-stat__value { font-size: 20px; }
	.ahp-head h2 { font-size: 21px; }
	.ahp-head__meta { text-align: left; }
	.ahp-card { padding: 16px; }
	.ahp-project__head { flex-direction: column-reverse; }
	.ahp-dl__row { grid-template-columns: 1fr; gap: 2px; }
	.ahp-table thead { display: none; }
	.ahp-table tr { display: block; border-bottom: 1px solid var(--ahp-line); padding: 6px 0; }
	.ahp-table td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 0; }
	.ahp-table td[data-label]::before { content: attr(data-label); color: var(--ahp-muted); font-weight: 600; }
}
.ahp-ptopbar__title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ahp-ptopbar__title strong { display: inline; font-size: 15px; }
.ahp-ptopbar__title .ahp-ptopbar__code { font-size: 12px; color: var(--ahp-muted); }

/* Top bar identity (v1.3.1): one line on desktop, hidden on small screens (shown in the account menu) */
.ahp-ptopbar__title { flex-wrap: nowrap; overflow: hidden; }
.ahp-ptopbar__title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.ahp-ptopbar__title .ahp-ptopbar__code { white-space: nowrap; }
.ahp-puser__name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .ahp-ptopbar__title .ahp-ptopbar__code { display: none; } }
@media (max-width: 900px) {
	.ahp-ptopbar__title, .ahp-puser__name, .ahp-puser > .ahp-icon { display: none !important; }
	.ahp-ptopbar__logo { flex: 1; min-width: 0; }
	.ahp-ptopbar__logo .ahp-brandmark img { max-height: 32px; max-width: 130px; }
	.ahp-ptopbar__actions { gap: 0; }
	.ahp-puser { padding: 2px; margin-left: 2px; }
	.ahp-dropdown { right: -4px; }
}

/* ===== Explore Services (client catalogue) ===== */
.ahp-page-intro { margin-bottom: 20px; }
.ahp-page-intro h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; color: var(--ahp-ink, #15302e); }
.ahp-page-intro p { margin: 0; color: var(--ahp-muted, #5c6f6b); font-size: 15px; max-width: 640px; line-height: 1.6; }

.ahp-svc-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 14.5px; line-height: 1.5; }
.ahp-svc-alert svg { flex: 0 0 auto; margin-top: 1px; }
.ahp-svc-alert--ok { background: #e7f7ee; border: 1px solid #a7ddbf; color: #1a7a44; }
.ahp-svc-alert--err { background: #fdecec; border: 1px solid #f3b6b8; color: #c0392b; }

.ahp-svc-section { margin-bottom: 30px; }
.ahp-svc-section__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ahp-svc-section__head h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ahp-ink, #15302e); display: inline-flex; align-items: center; gap: 8px; }
.ahp-svc-section__head h2 svg { color: #0e7c7b; }
.ahp-svc-section__sub { font-size: 13px; color: var(--ahp-muted, #6b7c78); }
.ahp-svc-cat { margin: 18px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #7a8a86; }

.ahp-svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px 22px; margin-bottom: 8px; }
.ahp-svc-cat { margin-top: 22px; }
.ahp-svc-card { position: relative; display: flex; gap: 12px; padding: 16px 16px 16px 18px; background: #fff; border: 1.5px solid #e4ece9; border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .08s; }
.ahp-svc-card:hover { border-color: #b9d8d4; box-shadow: 0 6px 18px -10px rgba(14,124,123,.4); }
.ahp-svc-card:active { transform: translateY(1px); }
.ahp-svc-card.is-selected { border-color: #0e7c7b; background: #f3fbfa; box-shadow: 0 0 0 1px #0e7c7b inset; }
.ahp-svc-check { position: absolute; opacity: 0; width: 0; height: 0; }
.ahp-svc-card__tick { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #cfdcd9; display: inline-grid; place-items: center; color: #fff; transition: background .15s, border-color .15s; }
.ahp-svc-card__tick svg { opacity: 0; transition: opacity .15s; }
.ahp-svc-card.is-selected .ahp-svc-card__tick { background: #0e7c7b; border-color: #0e7c7b; }
.ahp-svc-card.is-selected .ahp-svc-card__tick svg { opacity: 1; }
.ahp-svc-card__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ahp-svc-card__title { font-weight: 700; font-size: 15px; color: #16302e; line-height: 1.3; }
.ahp-svc-card__cat { align-self: flex-start; font-size: 11px; font-weight: 600; color: #0e6b6a; background: #e3f2f0; padding: 2px 8px; border-radius: 999px; }
.ahp-svc-card__desc { font-size: 13px; color: #5f716d; line-height: 1.5; }

.ahp-svc-message { margin: 8px 0 90px; }
.ahp-svc-message label { display: block; font-weight: 600; font-size: 14px; color: #24403e; margin-bottom: 7px; }
.ahp-svc-message textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #cfdbdb; border-radius: 10px; font: inherit; font-size: 14.5px; resize: vertical; }
.ahp-svc-message textarea:focus { outline: none; border-color: #0e7c7b; box-shadow: 0 0 0 3px rgba(14,124,123,.15); }

.ahp-svc-bar { position: sticky; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; margin: 0 -4px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid #e4ece9; border-radius: 14px; box-shadow: 0 -4px 20px -12px rgba(16,40,38,.35); z-index: 20; flex-wrap: wrap; }
.ahp-svc-bar__count { font-weight: 600; font-size: 14px; color: #3a4f4c; }

@media (max-width: 600px) {
	.ahp-svc-grid { grid-template-columns: 1fr; }
	.ahp-page-intro h1 { font-size: 21px; }
	.ahp-svc-bar { flex-direction: column; align-items: stretch; text-align: center; }
	.ahp-svc-bar .ahp-btn { width: 100%; justify-content: center; }
}

/* Service card: multiple category chips */
.ahp-svc-card__cats { display: flex; flex-wrap: wrap; gap: 5px; }

/* ===== Suggested services coverflow drawer ===== */
.ahp-suggest-body { padding-top: 8px; }
.ahp-cf { margin: 4px 0 4px; }

/* Swiper coverflow */
.ahp-swiper { width: 100%; padding: 18px 0 10px; overflow: hidden; }
.ahp-swiper .swiper-slide { width: min(300px, 78vw); height: auto; cursor: grab; transition: filter .45s ease, opacity .45s ease; }
.ahp-swiper .swiper-slide:active { cursor: grabbing; }
.ahp-swiper .swiper-slide:not(.swiper-slide-active) { filter: blur(1px); opacity: .9; }
.ahp-cf-card { height: 100%; box-sizing: border-box; min-height: 290px; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; background: #fff; border: 1px solid #e3ece9; border-radius: 20px; box-shadow: 0 16px 36px -18px rgba(16,40,38,.32); }
.swiper-slide-active .ahp-cf-card { border-color: #bfe0db; box-shadow: 0 30px 64px -22px rgba(14,124,123,.5); }
.ahp-cf-card__top { width: 48px; height: 48px; border-radius: 14px; background: #eaf6f4; color: #0e7c7b; display: grid; place-items: center; }
.ahp-cf-card__title { margin: 2px 0 0; font-size: 18px; font-weight: 800; color: #15302e; line-height: 1.25; }
.ahp-cf-card__cats { display: flex; flex-wrap: wrap; gap: 5px; }
.ahp-cf-card__cats span { font-size: 11px; font-weight: 600; color: #0e6b6a; background: #e3f2f0; padding: 3px 10px; border-radius: 999px; }
.ahp-cf-card__desc { margin: 0; font-size: 13.5px; color: #5f716d; line-height: 1.55; flex: 1; }
.ahp-cf-card__btn { align-self: flex-start; margin-top: auto; }

.ahp-cf__controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.ahp-cf__nav { width: 42px; height: 42px; min-width: 42px; flex: 0 0 42px; padding: 0; border-radius: 50%; border: 1px solid #d7e4e1; background: #fff; color: #15302e; display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(16,40,38,.35); transition: background .18s, border-color .18s, color .18s, transform .12s; }
.ahp-cf__nav:hover { background: #0e7c7b; border-color: #0e7c7b; color: #fff; }
.ahp-cf__nav:active { transform: scale(.9); }
.ahp-cf__nav.swiper-button-disabled { opacity: .4; pointer-events: none; }
.ahp-swiper-pagination { position: static !important; display: flex; align-items: center; justify-content: center; gap: 7px; width: auto !important; }
.ahp-swiper-pagination .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 !important; background: #cdddd9; opacity: 1; transition: width .25s, background .25s; }
.ahp-swiper-pagination .swiper-pagination-bullet-active { background: #0e7c7b; width: 22px; border-radius: 5px; }
.ahp-suggest-foot { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 2px; }

/* Mobile guards for the client portal */
.ahp-portal, .ahp-portal * { min-width: 0; }
.ahp-portal img { max-width: 100%; height: auto; }
.ahp-suggest-body { max-width: 100%; overflow: hidden; }
@media (max-width: 600px) {
	.ahp-portal--app .ahp-main { padding: 14px; }
	.ahp-page-intro h1 { font-size: 20px; }
}

/* Updates read / unread */
.ahp-side__badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ahp-side__link.is-active .ahp-side__badge { background: #fff; color: #0e7c7b; }
.ahp-notes__new { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: #0e7c7b; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.ahp-notes li.is-unread > a { background: #f1fbf9; }
.ahp-notes li.is-unread .ahp-notes__icon { color: #0e7c7b; }
.ahp-notes__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ahp-timeline--updates li.is-unread { background: #f1fbf9; border-radius: 10px; padding: 10px 12px; margin-left: -4px; }
.ahp-bell.has-unread .ahp-count { animation: ahp-bellpulse 1.8s ease-in-out infinite; }
@keyframes ahp-bellpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
