/* ==========================================================================
   Sattvic Core – client portal styles (sign-up, log-in, dashboard)

   Mobile first. Loaded only on portal pages. Colours use the theme's
   variables when the sattvic theme is active and fall back to the brand
   colours with any other theme, so the portal always looks on-brand.
   Buttons, inputs, notices and .form layout come from the theme; the
   fallbacks at the bottom keep them usable with other themes.
   ========================================================================== */

.sattvic-portal {
	--p-cream: var(--wp--preset--color--cream, #FBF6EE);
	--p-white: #FFFFFF;
	--p-leaf: var(--wp--preset--color--leaf, #2E3B2C);
	--p-sage: var(--wp--preset--color--sage, #5E7D52);
	--p-sage-dark: var(--wp--preset--color--sage-dark, #4A6541);
	--p-sage-light: var(--wp--preset--color--sage-light, #CFE0C3);
	--p-blush: var(--wp--preset--color--blush, #F2D4CF);
	--p-blush-dark: var(--wp--preset--color--blush-dark, #E3AFA7);
	--p-gold: var(--wp--preset--color--gold, #B8913F);
	--p-heading: var(--wp--preset--font-family--heading, "Cormorant Garamond", Georgia, serif);
	--p-radius: 20px;
	--p-radius-s: 12px;
	--p-shadow: 0 6px 24px rgba(46, 59, 44, 0.08);
	--p-gutter: var(--gutter, 1.25rem);
	--p-top: var(--header-h, 0px);
}

/* ---------- Page width ---------- */

.entry-content > .auth-card {
	width: calc(100% - 2 * var(--p-gutter));
	max-width: 480px;
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 5vw, 2rem);
}
.entry-content > .portal {
	max-width: calc(1120px + 2 * var(--p-gutter));
	padding-inline: var(--p-gutter);
	margin-inline: auto;
}

/* ---------- Auth cards (sign up, log in, reset) ---------- */

.auth-card {
	background: var(--p-white);
	border-radius: var(--p-radius);
	box-shadow: var(--p-shadow);
	padding-block: clamp(1.25rem, 5vw, 2rem);
	border-top: 3px solid var(--p-gold);
}
.auth-card .form { gap: 1.1rem; }
.auth-card__chosen {
	background: var(--p-cream);
	border-radius: var(--p-radius-s);
	padding: 0.85rem 1rem;
	font-size: 0.97rem;
}
.auth-card__links { margin: 1rem 0 0; text-align: center; }
.auth-card__switch {
	margin: 1.25rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid rgba(46, 59, 44, 0.12);
	text-align: center;
}

/* ---------- Form extras ---------- */

.button--block { width: 100%; }
/* ".button." prefix: the theme stylesheet loads after this one and its plain .button rule would otherwise win. */
.button.button--ghost {
	background: transparent;
	color: var(--p-leaf);
	border: 2px solid var(--p-sage);
}
.button.button--ghost:hover { background: var(--p-sage); color: var(--p-white); }
.button.button--light { background: var(--p-white); color: var(--p-leaf); }
.button--light:hover { background: var(--p-cream); color: var(--p-leaf); }

.password-field { position: relative; }
.password-field input { padding-right: 5rem; }
.password-field__toggle {
	position: absolute;
	top: 50%;
	right: 0.35rem;
	transform: translateY(-50%);
	min-height: 40px;
	padding: 0 0.85rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--p-sage-dark);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 500;
	cursor: pointer;
}
.password-field__toggle:hover { background: var(--p-cream); }

fieldset.form__field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.form__field legend { font-weight: 500; margin-bottom: 0.35rem; padding: 0; }
.form__label { font-weight: 500; margin: 0 0 0.35rem; }
.form__static { margin: 0 0 0.25rem; padding: 0.7rem 0.95rem; background: var(--p-cream); border-radius: 10px; overflow-wrap: anywhere; }

.form__phone-row { display: grid; grid-template-columns: minmax(0, 9.5rem) 1fr; gap: 0.5rem; }

/* Radio and checkbox lists: big tap targets. */
.choice-list { display: grid; gap: 0.5rem; }
.choice {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	margin: 0;
	padding: 0.75rem 0.9rem;
	border: 1px solid rgba(46, 59, 44, 0.25);
	border-radius: var(--p-radius-s);
	background: var(--p-white);
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}
.choice input { flex: none; width: 20px; height: 20px; margin: 0.05rem 0 0; accent-color: var(--p-sage); }
.choice:has(input:checked) { border-color: var(--p-sage); background: #F1F6EE; }
.choice:has(input:focus-visible) { outline: 2px solid var(--p-sage-dark); outline-offset: 1px; }
.form__choices--inline .choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
	.form__choices .choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.form__choices--inline .choice-list { grid-template-columns: repeat(2, minmax(0, 10rem)); }
}

.form__height-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.form__height-or { color: var(--p-sage-dark); font-size: 0.95rem; padding-inline: 0.15rem; }
.unit-input { position: relative; flex: 1 1 5.5rem; max-width: 9rem; }
.unit-input input { padding-right: 2.6rem; }
.unit-input > span[aria-hidden] {
	position: absolute;
	right: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--p-sage-dark);
	font-size: 0.92rem;
	pointer-events: none;
}

/* ---------- Dashboard header ---------- */

.portal { padding-top: clamp(1.25rem, 4vw, 2.5rem); }
.portal-head { margin-bottom: 1rem; }
.portal-head__hello {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0 0 0.25rem;
	font-size: 1rem;
	color: var(--p-sage-dark);
}
.portal-head__title {
	margin: 0;
	font-family: var(--p-heading);
	font-size: clamp(2rem, 7vw, 2.75rem);
	line-height: 1.1;
}

.status-pill {
	display: inline-block;
	padding: 0.15rem 0.7rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	line-height: 1.6;
}
.status-pill--free { background: var(--p-cream); border: 1px solid var(--p-sage-light); color: var(--p-leaf); }
.status-pill--active { background: var(--p-sage-dark); color: var(--p-white); }
.status-pill--expired { background: var(--p-blush); color: #6E2E24; }

/* ---------- Section navigation ---------- */

/* Phones: a sticky row of scrollable chips under the site header. */
.portal-nav {
	position: sticky;
	top: var(--p-top);
	z-index: 20;
	margin: 0 calc(-1 * var(--p-gutter)) 1.25rem;
	padding: 0.6rem var(--p-gutter);
	background: var(--p-cream);
	border-bottom: 1px solid rgba(46, 59, 44, 0.08);
}
.portal-nav__list {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 0.15rem 0.1rem;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.portal-nav__list::-webkit-scrollbar { display: none; }
.portal-nav__list li { flex: none; margin: 0; scroll-snap-align: start; }
.portal-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.4rem 0.95rem;
	border: 1px solid rgba(46, 59, 44, 0.18);
	border-radius: 999px;
	background: var(--p-white);
	color: var(--p-leaf);
	font-size: 0.95rem;
	text-decoration: none;
	white-space: nowrap;
}
.portal-nav__link .portal-icon { width: 18px; height: 18px; color: var(--p-sage-dark); }
.portal-nav__link:hover { border-color: var(--p-sage); color: var(--p-leaf); }
.portal-nav__link[aria-current="page"] { background: var(--p-sage-dark); border-color: var(--p-sage-dark); color: var(--p-white); }
.portal-nav__link[aria-current="page"] .portal-icon { color: var(--p-white); }
.portal-nav__link.is-locked { color: rgba(46, 59, 44, 0.78); }
.portal-nav__logout { display: none; }

.admin-bar .portal-nav { top: calc(var(--p-top) + 46px); }
@media (min-width: 783px) { .admin-bar .portal-nav { top: calc(var(--p-top) + 32px); } }

/* Desktop: sidebar + content. */
@media (min-width: 960px) {
	.portal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
	.portal-nav {
		top: calc(var(--p-top) + 1.5rem);
		margin: 0;
		padding: 0.75rem;
		border: 0;
		border-radius: var(--p-radius);
		background: var(--p-white);
		box-shadow: var(--p-shadow);
	}
	.portal-nav__list { flex-direction: column; gap: 0.15rem; overflow: visible; padding: 0; }
	.portal-nav__link { display: flex; border: 0; border-radius: var(--p-radius-s); background: transparent; }
	.portal-nav__link:hover { background: var(--p-cream); }
	.portal-nav__link[aria-current="page"]:hover { background: var(--p-sage-dark); }
	.portal-nav__logout {
		display: flex;
		align-items: center;
		gap: 0.4rem;
		margin-top: 0.5rem;
		padding: 0.75rem 0.95rem 0.35rem;
		border-top: 1px solid rgba(46, 59, 44, 0.1);
		color: var(--p-sage-dark);
		font-size: 0.95rem;
		text-decoration: none;
	}
	.portal-nav__logout .portal-icon { width: 18px; height: 18px; }
	.portal-nav__logout:hover { text-decoration: underline; }
	.admin-bar .portal-nav { top: calc(var(--p-top) + 32px + 1.5rem); }
}

/* ---------- Cards ---------- */

.portal-main > * + * { margin-top: 1.25rem; }
.portal-main > .notice { margin-bottom: 0; }

.portal-card {
	background: var(--p-white);
	border-radius: var(--p-radius);
	box-shadow: var(--p-shadow);
	padding: clamp(1.25rem, 5vw, 1.75rem);
}
.portal-card > :last-child { margin-bottom: 0; }
.portal-card__title {
	margin: 0 0 0.5rem;
	font-family: var(--p-heading);
	font-size: 1.6rem;
	line-height: 1.2;
}
.portal-card--centred { text-align: center; }
.portal-card--centred .button { margin-inline: auto; }
.portal-card--nudge { background: var(--p-blush); box-shadow: none; }
.portal-card--sage { background: var(--p-sage-dark); color: var(--p-white); box-shadow: none; }
.portal-card--sage .portal-card__title, .portal-card--sage a:not(.button) { color: var(--p-white); }
.portal-card--highlight { border: 2px solid var(--p-sage); scroll-margin-top: calc(var(--p-top) + 5rem); }

.portal-intro { margin: 0 0 1.25rem; font-size: 1.02rem; }
.portal-subtitle { margin: 2rem 0 0.85rem; font-family: var(--p-heading); font-size: 1.5rem; }
.portal-logout { text-align: center; }

/* Round icon badges on centred cards. */
.verify-card__icon, .locked-card__icon, .empty-card__icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--p-cream);
	color: var(--p-sage-dark);
}
.verify-card__icon .portal-icon, .locked-card__icon .portal-icon, .empty-card__icon .portal-icon { width: 30px; height: 30px; }
.verify-card { max-width: 520px; margin-inline: auto; }
.verify-card .notice { text-align: left; }
.verify-card__lead { font-size: 1.08rem; overflow-wrap: anywhere; }
.verify-card__help { margin-top: 1.25rem; font-size: 0.95rem; }

/* Progress meter. */
.meter { height: 10px; margin: 0.75rem 0 0.4rem; border-radius: 999px; background: rgba(46, 59, 44, 0.12); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--p-sage); }
.meter__label { margin: 0 0 1rem; font-size: 0.9rem; }
.portal-card--nudge .meter { background: rgba(255, 255, 255, 0.7); }
.portal-card--nudge .meter span { background: var(--p-sage-dark); }

/* Plan card. */
.plan-card__eyebrow {
	margin: 0 0 0.2rem;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--p-sage-dark);
}
.plan-card__days { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.5rem 0 0; }
.plan-card__days-number { font-family: var(--p-heading); font-size: 3rem; font-weight: 600; line-height: 1; color: var(--p-sage-dark); }
.plan-card__facts { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.plan-card__facts > div { display: grid; gap: 0.1rem; }
.plan-card__facts dt { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-sage-dark); }
.plan-card__facts dd { margin: 0; }
.plan-card__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (min-width: 560px) {
	.plan-card__facts { grid-template-columns: 1fr 1fr; }
	.plan-card__call { grid-column: 1 / -1; }
}

/* Tiles on the dashboard home: 2 per row on phones. */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
.tile { margin: 0; }
.tile a {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	height: 100%;
	padding: 1rem;
	border-radius: var(--p-radius-s);
	background: var(--p-white);
	box-shadow: var(--p-shadow);
	color: var(--p-leaf);
	text-decoration: none;
	transition: transform 0.2s ease;
}
.tile a:hover { transform: translateY(-2px); color: var(--p-leaf); }
.tile__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #F1F6EE; color: var(--p-sage-dark); }
.tile__title { font-weight: 500; font-size: 1.02rem; line-height: 1.3; }
.tile__text { font-size: 0.87rem; line-height: 1.45; }
.tile--locked a { background: rgba(255, 255, 255, 0.6); box-shadow: none; border: 1px dashed rgba(46, 59, 44, 0.3); }
.tile--locked .tile__icon { background: var(--p-cream); }

/* Renew banner (expired). */
.renew-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	padding: 1rem 1.25rem;
	border-radius: var(--p-radius-s);
	background: var(--p-blush);
	border-left: 4px solid var(--p-blush-dark);
}
.renew-banner p { flex: 1 1 16rem; margin: 0; }

/* Steps list on My plan. */
.steps-list { margin: 0 0 1rem; padding-left: 1.3rem; }
.steps-list li { margin-bottom: 0.5rem; }

/* Join panel. */
.join-panel__meta { font-size: 1.1rem; font-weight: 500; }

/* Badges and developer notes. */
.badge { display: inline-block; margin: 0 0 0.4rem; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; }
.badge--clients { background: var(--p-sage-dark); color: var(--p-white); }
.dev-note {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	border: 1px dashed var(--p-gold);
	border-radius: 6px;
	font-size: 0.8rem;
	color: var(--p-leaf);
}

/* Intake form. */
.intake-form { display: grid; gap: 1.25rem; }
.intake-form__group .portal-card__title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.intake-form__step {
	display: grid;
	place-items: center;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--p-sage-dark);
	color: var(--p-white);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
}
.intake-form__actions { display: grid; gap: 0.75rem; }
@media (min-width: 640px) {
	.intake-form__actions { grid-template-columns: repeat(2, max-content); }
}

.portal-recipes { margin-top: 0; }

/* ---------- Fallbacks when another theme is active ---------- */

.sattvic-portal .notice { padding: 1rem 1.25rem; border-radius: 10px; border-left: 4px solid; margin-bottom: 1.25rem; }
.sattvic-portal .notice--success { background: #EAF2E5; border-color: var(--p-sage); }
.sattvic-portal .notice--error { background: #FBEAE7; border-color: #8A3B2E; }
.sattvic-portal .form { display: grid; gap: 1.1rem; }
.sattvic-portal .form__error { color: #8A3B2E; font-weight: 500; margin: 0.35rem 0 0; }
.sattvic-portal .screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Fixes found in phone testing ---------- */

/* Keep hidden "(locked)" labels inside the scrolling chip row (no sideways page scroll). */
.portal-nav__list { position: relative; }
/* The theme indents lists in page content; portal lists are layouts, not text. */
body.sattvic-portal .entry-content ul.tile-grid,
body.sattvic-portal .entry-content ul.portal-nav__list { padding-left: 0; }
/* The sticky "Join Now" bar is hidden on portal pages, so drop the space reserved for it. */
body.sattvic-portal { padding-bottom: 0; }

/* ==========================================================================
   Phase 4: photos, progress, messages
   ========================================================================== */

.nav-badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #A3402E; /* white text 6:1 */
	color: var(--p-white);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
}

.link-button {
	padding: 0.35rem 0;
	border: 0;
	background: none;
	color: #8A3B2E;
	font: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	cursor: pointer;
}
.link-button:hover { color: var(--p-leaf); }

/* Two-way switch (Meal photos / Progress photos). */
.segmented {
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 4px;
	border-radius: 999px;
	background: var(--p-white);
	box-shadow: var(--p-shadow);
}
.segmented a {
	display: grid;
	place-items: center;
	min-height: 44px;
	border-radius: 999px;
	color: var(--p-leaf);
	font-weight: 500;
	text-decoration: none;
}
.segmented a[aria-current="page"] { background: var(--p-sage-dark); color: var(--p-white); }

.file-input {
	width: 100%;
	padding: 0.75rem;
	border: 2px dashed rgba(46, 59, 44, 0.3);
	border-radius: var(--p-radius-s);
	background: var(--p-cream);
	font: inherit;
	font-size: 0.95rem;
}
.file-input::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.55rem 1rem;
	border: 0;
	border-radius: 999px;
	background: var(--p-sage-dark);
	color: var(--p-white);
	font: inherit;
	cursor: pointer;
}
.pose-inputs { display: grid; gap: 1rem; }
@media (min-width: 720px) { .pose-inputs { grid-template-columns: repeat(3, 1fr); } }

/* Meal photo feed. */
.photo-feed { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .photo-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photo-post { margin: 0; overflow: hidden; border-radius: var(--p-radius); background: var(--p-white); box-shadow: var(--p-shadow); scroll-margin-top: calc(var(--p-top) + 5rem); }
.photo-post__image { display: block; background: var(--p-cream); }
.photo-post__image img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.photo-post__body { padding: 1rem 1.15rem 1.15rem; }
.photo-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.35rem; font-size: 0.88rem; color: var(--p-sage-dark); font-weight: 500; }
.photo-post__caption { margin: 0 0 0.6rem; }
.badge--waiting { margin: 0; background: var(--p-cream); border: 1px solid var(--p-sage-light); color: var(--p-leaf); }
.photo-comment { margin: 0.6rem 0; padding: 0.7rem 0.9rem; border-radius: var(--p-radius-s); background: #F1F6EE; border-left: 3px solid var(--p-sage); }
.photo-comment.is-new { background: var(--p-blush); border-left-color: var(--p-blush-dark); }
.photo-comment p { margin: 0; }
.photo-comment__who { font-size: 0.82rem; font-weight: 500; color: var(--p-sage-dark); margin-bottom: 0.2rem !important; }
.photo-delete { margin-top: 0.4rem; }
.portal-more { text-align: center; }

/* Progress photo timeline. */
.progress-timeline { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.25rem; }
.progress-timeline__day { margin: 0; padding: 1rem; border-radius: var(--p-radius); background: var(--p-white); box-shadow: var(--p-shadow); }
.progress-timeline__date { margin: 0 0 0.75rem; font-family: var(--p-heading); font-size: 1.3rem; }
.progress-timeline__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.progress-shot { margin: 0; text-align: center; font-size: 0.85rem; }
.progress-shot img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--p-cream); }
.progress-shot figcaption { margin-top: 0.3rem; }

/* Progress charts. */
.progress-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; margin-bottom: 0.5rem; }
.progress-summary p { margin: 0; }
.progress-summary__number { font-family: var(--p-heading); font-size: 2.6rem; font-weight: 600; color: var(--p-sage-dark); line-height: 1; }
.progress-summary__label, .progress-summary__change { color: var(--p-sage-dark); font-size: 0.95rem; }
.chart-figure { margin: 1rem 0 1.25rem; }
.chart-figure figcaption { font-weight: 500; margin-bottom: 0.25rem; }
.chart { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.9rem; }
.chart-legend li { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.chart-legend span { width: 18px; height: 4px; border-radius: 2px; }
.measure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
@media (min-width: 720px) { .measure-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.progress-table summary { cursor: pointer; font-weight: 500; color: var(--p-sage-dark); padding: 0.5rem 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.table-scroll th, .table-scroll td { padding: 0.5rem 0.6rem; border-bottom: 1px solid rgba(46, 59, 44, 0.12); text-align: left; white-space: nowrap; }
.table-scroll thead th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-sage-dark); }

/* Message thread. */
.thread { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.thread__day { align-self: center; margin: 0.5rem 0 0; padding: 0.15rem 0.75rem; border-radius: 999px; background: var(--p-cream); font-size: 0.8rem; color: var(--p-sage-dark); }
.bubble { max-width: 85%; margin: 0; padding: 0.65rem 0.9rem 0.45rem; border-radius: 16px; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 0.4rem; }
.bubble--theirs { align-self: flex-start; background: #F1F6EE; border-bottom-left-radius: 4px; }
.bubble--mine { align-self: flex-end; background: var(--p-blush); border-bottom-right-radius: 4px; }
.bubble__who { font-size: 0.78rem; font-weight: 600; color: var(--p-sage-dark); margin-bottom: 0.15rem !important; }
.bubble__time { font-size: 0.75rem; text-align: right; opacity: 0.85; margin: 0 !important; }
.thread-form { border-top: 1px solid rgba(46, 59, 44, 0.12); padding-top: 1rem; }
/* Portal lists are layouts: drop the theme's text-list indent. */
body.sattvic-portal .entry-content ul.photo-feed,
body.sattvic-portal .entry-content ol.progress-timeline,
body.sattvic-portal .entry-content ol.thread,
body.sattvic-portal .entry-content ul.chart-legend,
body.sattvic-portal .entry-content ul.meal-day__list,
body.sattvic-portal .entry-content ul.day-chips { padding-left: 0; }
.chart-figure .chart { max-width: 560px; }

/* ==========================================================================
   Phase 5: meal plan (client view + print), favourites
   ========================================================================== */

.meal-plan__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.meal-plan__meta { margin: 0; font-size: 0.9rem; color: var(--p-sage-dark); }
.meal-plan__note { margin: 1rem 0; padding: 0.85rem 1rem; border-radius: var(--p-radius-s); background: var(--p-cream); }
.meal-plan__note p:last-child { margin-bottom: 0; }
.day-chips { display: flex; gap: 0.4rem; margin: 1rem 0 0.5rem; padding: 0 0 0.25rem; list-style: none; overflow-x: auto; scrollbar-width: none; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chips li { flex: none; margin: 0; }
.day-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.9rem; border: 1px solid var(--p-sage-light); border-radius: 999px; color: var(--p-leaf); text-decoration: none; font-size: 0.92rem; white-space: nowrap; }
.day-chips a:hover { border-color: var(--p-sage); }
.meal-day { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(46, 59, 44, 0.12); scroll-margin-top: calc(var(--p-top) + 5rem); }
.meal-day__title { margin: 0 0 0.6rem; font-family: var(--p-heading); font-size: 1.45rem; }
.meal-day__list { display: grid; gap: 0.6rem; margin: 0; }
.meal-day__list > div { display: grid; gap: 0.1rem; }
@media (min-width: 600px) { .meal-day__list > div { grid-template-columns: 9.5rem 1fr; gap: 1rem; } }
.meal-day__list dt { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-sage-dark); padding-top: 0.2rem; }
.meal-day__list dd { margin: 0; }
.meal-day__note { margin: 0.75rem 0 0; font-style: italic; }

.recipe-tile { position: relative; display: flex; flex-direction: column; }
.recipe-tile .card { flex: 1; }
.recipe-tile__fav { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; }
.fav-button {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-height: 40px;
	padding: 0.3rem 0.85rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 8px rgba(46, 59, 44, 0.15);
	color: var(--p-leaf);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 500;
	cursor: pointer;
}
.fav-button span[aria-hidden] { font-size: 1.1rem; line-height: 1; }
.fav-button[aria-pressed="true"] span[aria-hidden] { color: #A3402E; }

/* Print: only the meal plan, on white, without site header, footer or navigation. */
@media print {
	.sattvic-portal--dashboard .site-header,
	.sattvic-portal--dashboard .site-footer,
	.sattvic-portal--dashboard .sticky-bar,
	.sattvic-portal--dashboard .portal-head__hello,
	.sattvic-portal--dashboard .portal-nav,
	.sattvic-portal--dashboard .day-chips-nav,
	.sattvic-portal--dashboard .no-print,
	.sattvic-portal--dashboard [data-sattvic-print],
	.sattvic-portal--dashboard .notice,
	.sattvic-portal--dashboard .skip-link { display: none !important; }
	body.sattvic-portal--dashboard { background: #fff !important; }
	.sattvic-portal--dashboard .portal-layout { display: block; }
	.sattvic-portal--dashboard .portal-card { box-shadow: none; padding: 0; }
	.meal-day { break-inside: avoid; }
	.meal-day__list > div { grid-template-columns: 9rem 1fr; gap: 1rem; }
}


/* ==========================================================================
   Discovery calls list (wp-admin + /coach/) and filter chips
   ========================================================================== */

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.filter-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.85rem; border: 1px solid rgba(46, 59, 44, 0.2); border-radius: 999px; background: var(--p-white); color: var(--p-leaf); text-decoration: none; font-size: 0.92rem; }
.filter-chips a[aria-current="page"] { background: var(--p-sage-dark); border-color: var(--p-sage-dark); color: var(--p-white); }
.call-list { display: grid; gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .call-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.call-card { margin: 0; }
.call-card--new { border-left: 4px solid var(--p-blush-dark); }
.call-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.25rem; font-size: 1.05rem; }
.call-card__meta { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--p-sage-dark); overflow-wrap: anywhere; }
.call-card__details { margin: 0 0 0.6rem; font-style: italic; }
.call-card__form { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.call-card__form label { margin: 0; font-size: 0.85rem; font-weight: 500; }
.call-card__form .button { justify-self: start; }
.status-pill--call-new { background: var(--p-blush); color: #6E2E24; }
.status-pill--call-contacted { background: var(--p-cream); border: 1px solid var(--p-sage-light); color: var(--p-leaf); }
.status-pill--call-converted { background: var(--p-sage-dark); color: var(--p-white); }
.status-pill--call-not_interested { background: #ECECEC; color: #3C3C3C; }

/* ==========================================================================
   /coach/ – Prachi's phone dashboard (also loads admin.css for shared lists)
   ========================================================================== */

.coach .portal-main > * + * { margin-top: 1.25rem; }
.coach .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .coach .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.coach .kpi > a { padding: 1rem; }
.coach .kpi--attention > a { box-shadow: inset 4px 0 0 var(--p-blush-dark); }
.coach .kpi__label { font-size: 0.9rem; line-height: 1.35; }
.coach .admin-photos { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .coach .admin-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.coach .admin-photo__body textarea { width: 100%; }
.coach .widefat { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.coach .widefat th, .coach .widefat td { padding: 0.45rem 0.4rem; border-bottom: 1px solid rgba(46, 59, 44, 0.12); text-align: left; vertical-align: top; }
.coach .widefat th { width: 42% !important; font-weight: 500; color: var(--p-sage-dark); }
.coach .description { font-size: 0.9rem; color: var(--p-sage-dark); }
.coach .button-primary { background: var(--p-sage-dark); }
.coach-search { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.coach-search input { flex: 1; }
.coach-clients { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.coach-clients a { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.5rem; align-items: center; padding: 0.85rem 1rem; border-radius: var(--p-radius-s); background: var(--p-white); box-shadow: var(--p-shadow); color: var(--p-leaf); text-decoration: none; }
.coach-clients__name { font-weight: 500; }
.coach-clients__sub { grid-column: 1 / -1; font-size: 0.88rem; color: var(--p-sage-dark); }
.coach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.coach-client-head__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.coach-inline-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.75rem; align-items: end; }
.coach-inline-form label { grid-row: 1; margin: 0; font-size: 0.85rem; }
.coach-inline-form .button { grid-column: 1 / -1; justify-self: start; }
.coach-setup-link { font-size: 0.9rem; text-align: center; }
body.sattvic-portal .entry-content ul.coach-clients,
body.sattvic-portal .entry-content ul.kpi-grid,
body.sattvic-portal .entry-content ul.call-list,
body.sattvic-portal .entry-content ul.admin-photos { padding-left: 0; }

/* ==========================================================================
   Phase 6: payments (client order page, history, Prachi's review cards)
   ========================================================================== */

.order-card__amount { margin: 0.25rem 0 1rem; font-family: var(--p-heading); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--p-sage-dark); }
.pay-steps { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: paystep; display: grid; gap: 1.25rem; }
.pay-steps > li { position: relative; margin: 0; padding: 0 0 0 2.75rem; counter-increment: paystep; }
.pay-steps > li::before {
	content: counter(paystep);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--p-sage-dark);
	color: var(--p-white);
	font-weight: 600;
}
.pay-steps h3 { margin: 0.15rem 0 0.5rem; font-size: 1.1rem; font-family: inherit; font-weight: 600; }
/* "Pay with UPI app" only where UPI apps exist: touch phones. Desktop shows the QR prominently. */
/* Specific selectors: the theme's .button { display: inline-flex } loads after this file. */
.pay-steps .upi-app-button, .pay-steps .upi-app-note { display: none; }
@media (hover: none) and (pointer: coarse) {
	.pay-steps .upi-app-button { display: flex; }
	.pay-steps .upi-app-note { display: block; font-size: 0.88rem; margin: 0.4rem 0 0.75rem; }
	.upi-qr__img { max-width: 180px; }
}
.upi-qr { margin: 0.75rem 0; text-align: center; }
.upi-qr__img { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; padding: 0.5rem; border-radius: var(--p-radius-s); background: var(--p-white); border: 1px solid rgba(46, 59, 44, 0.15); }
.upi-qr__text { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--p-sage-dark); }
.upi-id { margin: 0.5rem 0; overflow-wrap: anywhere; }
.upi-note { font-size: 0.92rem; }
.bank-details summary { cursor: pointer; font-weight: 500; color: var(--p-sage-dark); padding: 0.4rem 0; }
.bank-details dl { display: grid; gap: 0.35rem; margin: 0.5rem 0 0; }
.bank-details dl > div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; }
.bank-details dt { font-size: 0.85rem; color: var(--p-sage-dark); }
.bank-details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.pay-or { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; color: var(--p-sage-dark); font-size: 0.9rem; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; height: 1px; background: rgba(46, 59, 44, 0.15); }
.pay-list { margin: 0; padding: 0; list-style: none; }
body.sattvic-portal .entry-content ul.pay-list, body.sattvic-portal .entry-content ol.pay-steps { padding-left: 0; }
.pay-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin: 0; padding: 0.85rem 0; border-bottom: 1px solid rgba(46, 59, 44, 0.1); }
.pay-row__meta { font-size: 0.88rem; color: var(--p-sage-dark); }
.pay-row__right { text-align: right; }
.pay-row__amount { font-weight: 600; }
.status-pill--pay-awaiting { background: var(--p-blush); color: #6E2E24; }
.status-pill--pay-submitted { background: #FFF3D6; color: #5C4410; border: 1px solid #E5CC8A; }
.status-pill--pay-approved { background: var(--p-sage-dark); color: var(--p-white); }
.status-pill--pay-expired { background: #ECECEC; color: #3C3C3C; }
.pay-banner { margin-bottom: 0; }
.pay-facts { display: grid; gap: 0.3rem; margin: 0.25rem 0 0.5rem; }
.pay-facts > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem; }
.pay-facts dt { font-size: 0.85rem; color: var(--p-sage-dark); }
.pay-facts dd { margin: 0; overflow-wrap: anywhere; }
.pay-reject { margin-top: 0.5rem; }
.pay-reject summary { cursor: pointer; color: #8A3B2E; font-weight: 500; }
.pay-reject form { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.pay-reject textarea { width: 100%; }
.pay-reject .button { justify-self: start; }
.refund-note { margin: 0 0 0.75rem; padding: 0.6rem 0.85rem; border-radius: var(--p-radius-s); background: var(--p-cream); font-size: 0.92rem; }
.thread-card__reply-time { margin: -0.25rem 0 1rem; font-size: 0.92rem; color: var(--p-sage-dark); }
.progress-summary__water { margin: 0 0 0.5rem; color: var(--p-sage-dark); }
.upi-qr__svg { width: 100%; max-width: 260px; margin: 0 auto; padding: 0.5rem; border-radius: var(--p-radius-s); background: #fff; border: 1px solid rgba(46, 59, 44, 0.15); }
.upi-qr__svg svg { display: block; width: 100%; height: auto; }
@media (hover: none) and (pointer: coarse) { .upi-qr__svg { max-width: 200px; } }

/* ---------- Client reviews ("Share your experience") ---------- */
.review-card { border-top: 3px solid var(--c-blush, #F2D4CF); }
.review-card .review-form textarea { min-height: 9rem; }
.review-card .form__choices label,
.review-card .form__check label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.review-card .form__choices input,
.review-card .form__check input { margin-top: 0.3rem; flex: 0 0 auto; }
.review-later { margin-top: 0.75rem; }
.review-mine { margin: 0.75rem 0; padding: 0.9rem 1.1rem; border-left: 3px solid var(--c-blush, #F2D4CF); background: var(--c-cream, #FBF6EE); border-radius: 0 12px 12px 0; }
.review-mine p { margin: 0 0 0.6em; }
.review-mine p:last-child { margin-bottom: 0; }
.review-status { display: inline-block; padding: 0.2rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500; background: #EEF3EA; color: #3B5234; }
.review-status--pending { background: #FBF0D9; color: #6B4E12; }
.review-status--rejected,
.review-status--removed { background: #F3EEEA; color: #5B5148; }
.review-remove { margin-top: 0.75rem; }
.review-remove summary { cursor: pointer; color: var(--c-sage-dark, #4A6541); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.review-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.review-actions .inline-form { display: inline; margin: 0; }
.review-fix { margin: 0.5rem 0 0.25rem; }
.review-fix summary { cursor: pointer; color: var(--c-sage-dark, #4A6541); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.review-fix textarea { width: 100%; min-height: 8rem; margin: 0.4rem 0 0.6rem; }
