/* Brook Aligns – Portal & Dashboard (functional base styles).
   The final site-wide design pass may restyle these; class names are stable. */

.bap {
	--bap-bg: #faf6ef;
	--bap-blush: #f2d7c4;
	--bap-terra: #b26a48;
	--bap-cocoa: #4a2b28;
	--bap-card: #ffffff;
	--bap-line: #e9dccf;
	--bap-radius: 14px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 16px 64px;
	color: var(--bap-cocoa);
	font-size: 16px;
	line-height: 1.55;
}

.bap-card {
	background: var(--bap-card);
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 22px;
	margin: 0 0 20px;
	box-shadow: 0 2px 10px rgba(74, 43, 40, 0.05);
}

.bap-card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.bap-card h3 { margin: 18px 0 8px; font-size: 1.05rem; }
.bap-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.bap-card-head h2 { margin: 0; }

.bap-topbar { margin-bottom: 20px; }
.bap-topbar-id { display: flex; align-items: center; gap: 14px; }
.bap-hello { margin: 0; font-size: 1.6rem; }

.bap-avatar { border-radius: 50%; display: block; }
.bap-avatar-sm { width: 48px; height: 48px; }
.bap-avatar-fallback {
	width: 80px; height: 80px; border-radius: 50%;
	background: var(--bap-blush);
}
.bap-avatar-fallback.bap-avatar-sm { width: 48px; height: 48px; }

/* Buttons */
.bap-btn {
	display: inline-block;
	border: 0;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.bap-btn-primary { background: var(--bap-terra); color: #fff; }
.bap-btn-primary:hover { filter: brightness(1.06); color: #fff; }
.bap-btn:disabled, .bap-btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.bap-btn-secondary { background: var(--bap-blush); color: var(--bap-cocoa); }
.bap-btn-sm { padding: 6px 14px; font-size: 0.9rem; }
.bap-linklike {
	background: none; border: 0; padding: 0;
	color: var(--bap-terra); text-decoration: underline; cursor: pointer;
	font-size: 0.9rem;
}
.bap-danger { color: #b42318; }

/* Pills */
.bap-pill {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
	padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.bap-pill-private { background: #f6ddd0; color: var(--bap-cocoa); }
.bap-pill-shared { background: #e8f0e4; color: #2f5d33; }

/* Tabs */
.bap-tabs {
	display: flex; gap: 6px; margin: 0 0 20px;
	border-bottom: 2px solid var(--bap-line);
}
.bap-tab {
	background: none; border: 0; padding: 10px 18px;
	font-size: 1rem; font-weight: 600; color: var(--bap-cocoa);
	cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.bap-tab.is-active { border-bottom-color: var(--bap-terra); color: var(--bap-terra); }
.bap-tab-panel { display: none; }
.bap-tab-panel.is-active { display: block; }

/* Progress */
.bap-progress {
	height: 10px; background: var(--bap-blush); border-radius: 999px; overflow: hidden;
	margin: 8px 0;
}
.bap-progress-fill { height: 100%; background: var(--bap-terra); border-radius: 999px; transition: width 0.3s; }
.bap-goal-top { display: flex; justify-content: space-between; align-items: baseline; }
.bap-goal-top h2 { margin: 0; font-size: 1.1rem; }
.bap-goal-sub { margin: 6px 0 0; font-size: 0.95rem; }
.bap-goal-giving, .bap-goal-met { display: block; font-size: 0.85rem; opacity: 0.8; }

/* Client list */
.bap-search { display: flex; gap: 8px; }
.bap-search input[type="search"] {
	border: 1px solid var(--bap-line); border-radius: 999px; padding: 8px 16px;
}
.bap-client-list { list-style: none; margin: 0; padding: 0; }
.bap-client-list li { border-top: 1px solid var(--bap-line); }
.bap-client-list li:first-child { border-top: 0; }
.bap-client-row {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 4px; text-decoration: none; color: inherit;
}
.bap-client-row:hover { background: var(--bap-bg); }
.bap-client-row-main { flex: 1; display: flex; flex-direction: column; }
.bap-client-row-main small { opacity: 0.75; }
.bap-client-row-arrow { font-size: 1.6rem; color: var(--bap-terra); }

/* Record header */
.bap-record-head { display: flex; gap: 18px; align-items: flex-start; }
.bap-record-head-main { flex: 1; }
.bap-record-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.bap-subtitle { margin: 0 0 10px; opacity: 0.8; }
.bap-record-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.bap-record-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.bap-sent-note { font-size: 0.9rem; opacity: 0.8; font-style: italic; }
.bap-working-on-form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.bap-working-on-form input[type="text"] {
	flex: 1; min-width: 220px; border: 1px solid var(--bap-line);
	border-radius: 10px; padding: 8px 12px;
}
.bap-back { color: var(--bap-terra); text-decoration: none; font-weight: 600; }

/* Notes */
.bap-notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .bap-notes-grid { grid-template-columns: 1fr; } }
.bap-note-card textarea {
	width: 100%; border: 1px solid var(--bap-line); border-radius: 10px;
	padding: 12px; font: inherit; resize: vertical;
}
.bap-note-private { border-top: 4px solid var(--bap-terra); }
.bap-note-shared { border-top: 4px solid #7ba05b; }
.bap-save-state { margin-left: 10px; font-size: 0.9rem; opacity: 0.75; }

/* Lists */
.bap-appt-list, .bap-media-list, .bap-hw-list { list-style: none; margin: 12px 0 0; padding: 0; }
.bap-appt, .bap-media-list li {
	display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
	padding: 10px 0; border-top: 1px solid var(--bap-line);
}
.bap-appt:first-child, .bap-media-list li:first-child { border-top: 0; }
.bap-appt-meta, .bap-media-list small { opacity: 0.7; font-size: 0.88rem; }
.bap-media-list a { color: var(--bap-terra); font-weight: 600; }
.bap-hw-item { padding: 8px 0; border-top: 1px solid var(--bap-line); display: flex; align-items: center; gap: 10px; }
.bap-hw-row-actions { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }
.bap-hw-item:first-child { border-top: 0; }
.bap-hw-item label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.bap-hw-item.is-done span { text-decoration: line-through; opacity: 0.6; }
.bap-hw-progress { margin: 0 0 4px; }

.bap-inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.bap-inline-form input[type="text"],
.bap-inline-form input[type="url"],
.bap-inline-form input[type="date"] {
	border: 1px solid var(--bap-line); border-radius: 10px; padding: 8px 12px; font: inherit;
}
.bap-hint { font-size: 0.88rem; opacity: 0.75; }
.bap-empty { opacity: 0.7; font-style: italic; }
.bap-eyebrow {
	text-transform: uppercase; letter-spacing: 0.08em;
	font-size: 0.78rem; font-weight: 700; color: var(--bap-terra); margin: 0 0 6px;
}
.bap-upnext-when { font-size: 1.15rem; font-weight: 600; }

.bap-intake summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 4px 0; }
.bap-intake-list { margin: 12px 0 0; }
.bap-intake-list dt { font-weight: 700; margin-top: 10px; }
.bap-intake-list dd { margin: 2px 0 0 0; white-space: pre-wrap; }

.bap-shared-note {
	background: var(--bap-bg); border-left: 4px solid var(--bap-terra);
	padding: 12px 16px; border-radius: 0 10px 10px 0; margin-bottom: 14px;
}
.bap-where-started { margin-top: 22px; }
.bap-profile-panel { margin-top: 12px; }

/* -------------------------------------------------------------------------
 * Designed login views (v1.0.4) — replace the plain wp-login.php redirect.
 * ------------------------------------------------------------------------- */
.bap-login-stage {
	min-height: calc(100vh - 78px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 52px 24px;
}
.bap-login-greeting {
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(30px, 6vw, 44px);
	font-weight: 600;
	color: #4a2b28;
	letter-spacing: -.02em;
	text-align: center;
	margin: 0 0 22px;
}
/* Full-viewport sky backdrop via body class (added in brookaligns-portal.php). */
body.bap-login-page {
	background-color: #faf6ef !important;
	background-image: url("../login-page-bg.png") !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-attachment: fixed !important;
}
/* Let the sky show through Astra's content wrappers. */
body.bap-login-page #page,
body.bap-login-page .site,
body.bap-login-page #content,
body.bap-login-page .site-content,
body.bap-login-page #primary,
body.bap-login-page main#main,
body.bap-login-page article,
body.bap-login-page .entry-content {
	background: transparent !important;
}
.bap-login-card {
	width: 100%;
	max-width: 500px;
	border-radius: 25px;
	background: rgba(255, 253, 249, .94);
	border: 1px solid rgba(74, 43, 40, .2);
	box-shadow: 0 26px 70px rgba(74, 43, 40, .25);
	padding: clamp(26px, 5vw, 38px);
	text-align: center;
}
.bap-login-avatar {
	width: 74px;
	height: 74px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	margin: 0 auto 14px;
	box-shadow: 0 8px 22px rgba(74, 43, 40, .18);
}
.bap-login-card h2 {
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(30px, 6vw, 40px);
	font-weight: 600;
	color: #4a2b28;
	letter-spacing: -.02em;
	margin: 0 0 18px;
}
.bap-login-card form {
	text-align: left;
	margin: 0;
}
.bap-login-card form p {
	margin: 0 0 14px;
}
.bap-login-card label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #4a2b28;
	margin-bottom: 6px;
}
.bap-login-card input[type="text"],
.bap-login-card input[type="password"] {
	width: 100%;
	border-radius: 999px;
	border: 1px solid #e8d8cf;
	background: #fffdf9;
	padding: 13px 18px;
	font-size: 16px;
	color: #4a2b28;
	box-sizing: border-box;
}
.bap-login-card input[type="text"]:focus,
.bap-login-card input[type="password"]:focus {
	outline: none;
	border-color: #b26a48;
	box-shadow: 0 0 0 3px rgba(178, 106, 72, .18);
}
.bap-login-card .forgetmenot {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #60443f;
}
.bap-login-card #wp-submit {
	width: 100%;
	border: none;
	cursor: pointer;
	border-radius: 999px;
	background: #b26a48;
	color: #fffdf9;
	font-weight: 700;
	font-size: 16px;
	padding: 14px 22px;
	margin-top: 6px;
	transition: background .2s ease, transform .15s ease;
}
.bap-login-card #wp-submit:hover {
	background: #8e4d31;
	transform: translateY(-1px);
}
.bap-login-card .login-remember {
	display: none;
}
.bap-login-links {
	margin-top: 14px;
	font-size: 14px;
}
.bap-login-links a {
	color: #8e4d31;
}
.bap-login-support {
	margin-top: 16px;
	font-size: 12px;
	color: rgba(96, 68, 63, .75);
}

/* -------------------------------------------------------------------------
 * v1.1.0 — Client portal prototype match ([bap_portal] only).
 * Scoped to .bap-portal so the dashboard is untouched.
 * ------------------------------------------------------------------------- */
.bap-portal h1,
.bap-portal h2,
.bap-portal h3 {
	font-family: "Newsreader", Georgia, serif;
	font-weight: 600;
	color: #4a2b28;
	letter-spacing: -.01em;
}

/* Greeting: large serif with avatar, per prototype. */
.bap-portal .bap-topbar { margin-bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bap-portal .bap-topbar-id { gap: 18px; }
.bap-portal .bap-portal-footer { display: flex; justify-content: flex-end; margin-top: 28px; }
.bap-portal .bap-logout-btn { flex-shrink: 0; text-decoration: none; }
/* Account menu: small avatar top-right, dropdown with photo + password forms. */
.bap-portal .bap-account { position: relative; }
.bap-portal .bap-account-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.bap-portal .bap-account-btn .bap-avatar-sm { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; box-shadow: 0 4px 14px rgba(74,43,40,.18); }
.bap-portal .bap-account-menu { position: absolute; top: calc(100% + 10px); right: 0; width: min(320px, 80vw); background: #fffdf9; border: 1px solid var(--bap-line); border-radius: 18px; box-shadow: 0 18px 44px rgba(74,43,40,.18); padding: 18px; z-index: 50; }
.bap-portal .bap-account-name { font-weight: 700; margin: 0 0 10px; color: var(--bap-cocoa); }
.bap-portal .bap-account-form { display: grid; gap: 10px; margin: 0; }
.bap-portal .bap-field-label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; color: var(--bap-cocoa); }
.bap-portal .bap-field-label input { width: 100%; }
.bap-portal .bap-account-divider { border: 0; border-top: 1px solid var(--bap-line); margin: 14px 0; }
.bap-portal .bap-notice { border-radius: 12px; padding: 8px 12px; font-size: .9rem; margin: 0 0 10px; }
.bap-portal .bap-notice-success { background: #eef5e9; color: #3d5a34; }
.bap-portal .bap-notice-error { background: #f9e9e4; color: #8a3b2a; }
.bap-portal .bap-avatar {
	width: 72px;
	height: 72px;
	object-fit: cover;
	box-shadow: 0 6px 18px rgba(74, 43, 40, .15);
}
.bap-portal .bap-hello {
	font-size: clamp(2rem, 5vw, 2.9rem);
	line-height: 1.15;
}

/* Tabs: pill-style like the prototype. */
.bap-portal .bap-tabs {
	border-bottom: 0;
	background: #fffdf9;
	border: 1px solid var(--bap-line);
	border-radius: 999px;
	padding: 5px;
	gap: 4px;
	display: inline-flex;
	margin-bottom: 26px;
}
.bap-portal .bap-tab {
	border-bottom: 0;
	margin-bottom: 0;
	border-radius: 999px;
	padding: 9px 22px;
}
.bap-portal .bap-tab.is-active {
	background: var(--bap-blush);
	color: var(--bap-cocoa);
}

/* UP NEXT card with cloud backdrop. */
.bap-upnext {
	background:
		linear-gradient(rgba(250, 246, 239, .62), rgba(250, 246, 239, .42)),
		url("../login-page-bg.png");
	background-size: cover;
	background-position: center;
	border: 0;
	padding: 30px 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.bap-upnext-main { flex: 1; min-width: 0; }
.bap-upnext-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bap-upnext-note { margin: 0; }
.bap-upnext h2 {
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	margin: 0 0 6px;
}
.bap-upnext .bap-eyebrow { margin-bottom: 8px; }
.bap-upnext-when { font-size: 1.1rem; font-weight: 600; margin: 0 0 12px; }
.bap-upnext-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 0; flex-shrink: 0; align-items: center; justify-content: flex-end; }
@media (max-width: 600px) {
	.bap-upnext { flex-direction: column; align-items: stretch; }
	.bap-upnext-side { align-items: stretch; }
	.bap-upnext-actions { margin-top: 14px; justify-content: flex-start; }
}

/* Badge pill ("Available 15 min before your session", "$20 · Online only · 12 spots"). */
.bap-badge {
	display: inline-block;
	background: rgba(74, 43, 40, .12);
	color: var(--bap-cocoa);
	font-size: 0.82rem;
	font-weight: 600;
	padding: 7px 16px;
	border-radius: 999px;
	white-space: nowrap;
}

/* White button (Reschedule). */
.bap-btn-white { background: #fffdf9; color: var(--bap-cocoa); border: 1px solid var(--bap-line); }
.bap-btn-white:hover { background: #fff; color: var(--bap-cocoa); }

/* Booking section: modality toggle + service cards. */
/* Booking popups: Bookly form in a modal dialog. */
.bap-booking-modal { position: fixed; inset: 0; z-index: 9999; }
.bap-booking-modal[hidden] { display: none !important; }
.bap-booking-overlay { position: absolute; inset: 0; background: rgba(74, 43, 40, .55); }
.bap-booking-dialog { position: relative; width: calc(100% - 32px); max-width: 680px; max-height: 88vh; overflow-y: auto; margin: 6vh auto; background: #fffdf9; border-radius: 22px; padding: 30px 26px; box-shadow: 0 24px 70px rgba(74, 43, 40, .32); }
.bap-booking-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--bap-cocoa); cursor: pointer; padding: 6px; }
.bap-booking-x:hover { color: var(--bap-terra); }
body.bap-modal-open { overflow: hidden; }
/* Portal booking popups: streamlined — no intro text, straight to calendar. */
.bap-booking-dialog .bookly-info-text { display: none !important; }
/* Bookly's BACK button must always be visible, not hover-only.
   Colors (v1.4.8, Andee): Brook's theme — BACK is the soft secondary
   (cream + cocoa), NEXT / Book Now is terracotta like every primary
   button on the site. */
.bap-booking-dialog .bookly-back-step,
.bap-booking-dialog button[class*="back-step"],
.bap-booking-dialog .bookly-btn[class*="back"] {
	opacity: 1 !important;
	visibility: visible !important;
	color: #4a2b28 !important;
	background: #f4ece1 !important;
	border-color: #e5d9c8 !important;
}
.bap-booking-dialog .bookly-next-step,
.bap-booking-dialog button[class*="next-step"] {
	background: #b26a48 !important;
	border-color: #b26a48 !important;
	color: #fff !important;
}

/* Booking popup dialog: wider to fit calendar + slots */
.bap-booking-dialog {
	max-width: 880px !important;
	width: calc(100vw - 40px) !important;
}
/* Calendar + time slots: side by side on desktop, stacked on mobile */
.bap-booking-dialog .bookly-time-step {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 24px !important;
}
.bap-booking-dialog .bookly-time-step > * {
	flex: 1 1 300px !important;
	min-width: 0 !important;
}
@media (max-width: 640px) {
	.bap-booking-dialog .bookly-time-step {
		flex-direction: column !important;
	}
}

/* ---- Portal booking: soft brand styling on Bookly's native layout ---- */
.bap-booking-dialog .bookly-form {
	--bookly-primary: #b26a48;
	--bookly-primary-light: #faf6ef;
}
/* Pill buttons (time slots, SINGLE/RECURRING, DAILY/WEEKLY): softer */
.bap-booking-dialog [class*="bookly"] button,
.bap-booking-dialog [class*="bookly"] .bookly-pill,
.bap-booking-dialog [class*="bookly"] [role="button"] {
	border-radius: 999px !important;
}
/* Active/selected pills: warm terracotta */
.bap-booking-dialog [class*="bookly"] .active,
.bap-booking-dialog [class*="bookly"] [aria-selected="true"],
.bap-booking-dialog [class*="bookly"] [aria-pressed="true"] {
	background: #b26a48 !important;
	border-color: #b26a48 !important;
	color: #fff !important;
}
/* Inputs: softly rounded, warm border */
.bap-booking-dialog [class*="bookly"] input[type="text"],
.bap-booking-dialog [class*="bookly"] input[type="date"],
.bap-booking-dialog [class*="bookly"] input[type="time"],
.bap-booking-dialog [class*="bookly"] select {
	border-radius: 12px !important;
	border-color: #e8ddd0 !important;
	background: #fffdf9 !important;
}
/* Recurring step restyle (v1.4.4): Single / Recurring pill choice,
   mirroring the portal's Online/In-person toggle. */
.bap-recurring-choice { margin: 6px 0 18px; }
.bap-recurring-caption { font-weight: 600; color: #4a2b28; margin-bottom: 10px; }
.bap-recurring-pills {
	display: inline-flex;
	background: #f4ece1;
	border-radius: 999px;
	padding: 5px;
	gap: 4px;
}
.bap-rec-pill {
	border: 0;
	background: transparent;
	border-radius: 999px;
	padding: 9px 26px;
	font-weight: 700;
	font-size: 0.95rem;
	color: #4a2b28;
	cursor: pointer;
}
.bap-rec-pill.is-active {
	background: #b26a48;
	color: #fff;
}
/* Portal popup: hide Bookly's native repeat checkbox row — the
   Single/Recurring pills replace it (v1.4.6). A stylesheet rule, not JS:
   Bookly re-renders steps and toggles attributes in ways a JS observer
   can miss, but it cannot resurrect a row CSS has hidden. Scoped to the
   portal dialog so the standalone booking page keeps its checkbox. */
.bap-booking-dialog .bookly-repeat-step .bookly-checkbox-group {
	display: none !important;
}
/* Bookly's own button styles paint every <button> in its form terracotta —
   the pills need !important so only the chosen one is filled (v1.4.5). */
.bap-booking-dialog .bap-rec-pill {
	background: transparent !important;
	color: #4a2b28 !important;
}
.bap-booking-dialog .bap-rec-pill.is-active {
	background: #b26a48 !important;
	color: #fff !important;
}
/* Details-step cover (v1.4.7): the details step is auto-skipped for
   logged-in clients — cover it while it advances so the form never
   flashes on screen at all. */
.bap-cover {
	position: absolute;
	inset: 0;
	z-index: 60;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: #fffdf9;
	border-radius: 22px;
	color: #4a2b28;
	font-weight: 600;
}
.bap-cover-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid #eee3d5;
	border-top-color: #b26a48;
	animation: bap-spin .8s linear infinite;
}
@keyframes bap-spin { to { transform: rotate( 360deg ); } }
/* Step buttons on opposite sides of the bar (v1.4.5). */
.bap-btn-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	gap: 12px;
}
/* Payment-step booking summary card (v1.4.5). */
.bap-pay-summary {
	background: #fffdf9;
	border: 1px solid #eee3d5;
	border-radius: 16px;
	padding: 18px 22px;
	margin-bottom: 14px;
	font-weight: 600;
	color: #4a2b28;
}
/* Online-only services are hidden when the In-person modality is active. */
.bap-service-card.bap-online-only.is-hidden { display: none; }
.bap-booking .bap-hint { margin: 0 0 14px; }
.bap-modality-toggle {
	display: inline-flex;
	background: #f4ece1;
	border-radius: 999px;
	padding: 5px;
	gap: 4px;
	margin-bottom: 18px;
}
.bap-modality-btn {
	border: 0;
	background: transparent;
	border-radius: 999px;
	padding: 9px 26px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--bap-cocoa);
	cursor: pointer;
}
.bap-modality-btn.is-active {
	background: var(--bap-terra);
	color: #fffdf9;
}
.bap-service-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.bap-service-card {
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
}
.bap-service-name { font-size: 1.02rem; }
.bap-service-meta { font-size: 0.9rem; opacity: 0.8; }
.bap-service-card .bap-btn { margin-top: auto; width: 100%; text-align: center; }

/* Upcoming Pilates class card. */
.bap-pilates-detail {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 18px 20px;
	margin-top: 6px;
}
.bap-pilates-main { display: flex; flex-direction: column; gap: 4px; }
.bap-pilates-main strong { font-size: 1.1rem; }
.bap-spots { font-weight: 700; color: var(--bap-terra); font-size: 0.92rem; }

/* Session recording cards. */
.bap-rec-card {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 16px 18px;
	margin-top: 12px;
}
.bap-rec-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.bap-rec-main small { opacity: 0.7; font-size: 0.85rem; }
.bap-pill-rec { background: var(--bap-blush); color: var(--bap-cocoa); }
.bap-rec-link { color: var(--bap-terra); font-weight: 700; }

/* Care history note cards. */
.bap-note-card {
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 14px 18px;
	margin-top: 12px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.bap-note-date { font-size: 0.88rem; opacity: 0.7; white-space: nowrap; }
.bap-note-card .bap-shared-note { margin-bottom: 0; flex: 1 1 100%; }

/* "Where you started" gait video cards. */
.bap-gait-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin-top: 12px;
}
.bap-gait-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 14px 16px;
	text-decoration: none;
	color: inherit;
}
.bap-gait-card:hover { border-color: var(--bap-terra); }
.bap-play {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--bap-blush);
	position: relative;
}
.bap-play::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-38%, -50%);
	border-left: 14px solid var(--bap-terra);
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
}
.bap-gait-meta { display: flex; flex-direction: column; gap: 2px; }
.bap-gait-meta small { opacity: 0.7; font-size: 0.85rem; }

/* Messages tab: embedded inbox + sidebar. */
.bap-messages-wrap {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 20px;
	align-items: start;
}
.bap-bm-embed { min-height: 420px; }
.bap-bm-embed .bm-wrapper,
.bap-bm-embed .better-messages-wrapper { max-width: 100%; }
.bap-messages-side .bap-card { margin-bottom: 0; }
.bap-messages-side h3 { margin: 0 0 10px; font-size: 1.15rem; }

/* Profile settings card. */
.bap-profile-card label { font-weight: 600; }

/* Responsive. */
@media (max-width: 900px) {
	.bap-service-grid { grid-template-columns: repeat(2, 1fr); }
	.bap-messages-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.bap-service-grid { grid-template-columns: 1fr; }
	.bap-gait-grid { grid-template-columns: 1fr; }
	.bap-portal .bap-tabs { display: flex; width: 100%; }
	.bap-portal .bap-tab { flex: 1; padding: 9px 8px; font-size: 0.92rem; }
	.bap-upnext-actions .bap-btn { flex: 1; text-align: center; }
}

/* -------------------------------------------------------------------------
 * v1.2.0 — Therapist dashboard prototype match ([bap_dashboard] only).
 * Scoped to .bap-dashboard so the portal is untouched.
 * ------------------------------------------------------------------------- */
.bap-dashboard { max-width: 1320px; }
.bap-dashboard h1,
.bap-dashboard h2,
.bap-dashboard h3 {
	font-family: "Newsreader", Georgia, serif;
	font-weight: 600;
	color: #4a2b28;
	letter-spacing: -.01em;
}

/* Sidebar shell. */
.bap-dash-shell {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}
.bap-dash-side {
	position: sticky;
	top: 24px;
	background: #fffdf9;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 24px 16px;
	box-shadow: 0 2px 10px rgba(74, 43, 40, 0.05);
}
.bap-dash-logo {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	margin: 0 auto 20px;
	box-shadow: 0 8px 22px rgba(74, 43, 40, .15);
}
.bap-dash-nav { display: flex; flex-direction: column; gap: 4px; }
.bap-dash-nav-item {
	display: block;
	padding: 10px 16px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--bap-cocoa);
	font-weight: 600;
}
.bap-dash-nav-item:hover { background: var(--bap-bg); color: var(--bap-cocoa); }
.bap-dash-nav-item.is-active { background: var(--bap-blush); }

/* Top-corner greeting. */
.bap-dash-topbar { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.bap-dash-hello {
	margin: 0;
	font-family: "Newsreader", Georgia, serif;
	font-size: 1.3rem;
	font-weight: 600;
	color: #4a2b28;
}

/* Client list: search, filters, status badges. */
.bap-client-search { margin-bottom: 6px; }
.bap-client-search input[type="search"] { flex: 1; min-width: 180px; }
.bap-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.bap-filter {
	border: 1px solid var(--bap-line);
	background: #fffdf9;
	border-radius: 999px;
	padding: 7px 18px;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--bap-cocoa);
	text-decoration: none;
}
.bap-filter:hover { border-color: var(--bap-terra); color: var(--bap-cocoa); }
.bap-filter.is-active { background: var(--bap-terra); border-color: var(--bap-terra); color: #fffdf9; }
.bap-filter .count { opacity: .75; font-weight: 400; }
.bap-dashboard .bap-client-row { gap: 12px; }
.bap-avatar-initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: var(--bap-cocoa);
	font-size: 0.95rem;
}
.bap-avatar-lg { width: 80px; height: 80px; font-size: 1.5rem; flex-shrink: 0; }

/* Status badges. */
.bap-status {
	display: inline-flex; align-items: center;
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
	text-transform: uppercase; white-space: nowrap;
	padding: 4px 12px; border-radius: 999px; flex-shrink: 0;
}
.bap-status-onboarded { background: #e8f0e4; color: #2f5d33; }
.bap-status-awaiting { background: #f7e8d0; color: #8a5a1b; }
.bap-status-new { background: var(--bap-blush); color: var(--bap-cocoa); }
.bap-status-paid { background: #e8f0e4; color: #2f5d33; }
.bap-status-upcoming { background: var(--bap-blush); color: var(--bap-cocoa); }
.bap-status-done { background: #eee7dd; color: #6b5d55; }

/* Client record. */
.bap-record-top {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; margin-bottom: 14px;
}
.bap-dashboard .bap-record-head h1 {
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	line-height: 1.1;
}

/* Next-session cloud card (dashboard version of the portal UP NEXT card). */
.bap-dashboard .bap-upnext {
	background:
		linear-gradient(rgba(250, 246, 239, .62), rgba(250, 246, 239, .42)),
		url("../login-page-bg.png");
	background-size: cover;
	background-position: center;
	border: 0;
	padding: 30px 28px;
}
.bap-dashboard .bap-upnext h2 {
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	margin: 0 0 6px;
}
.bap-dashboard .bap-upnext .bap-eyebrow { margin-bottom: 8px; }
.bap-dashboard .bap-upnext-when { font-size: 1.1rem; font-weight: 600; margin: 0 0 12px; }
.bap-dashboard .bap-badge {
	display: inline-block;
	background: rgba(74, 43, 40, .12);
	color: var(--bap-cocoa);
	font-size: 0.82rem;
	font-weight: 600;
	padding: 7px 16px;
	border-radius: 999px;
	white-space: nowrap;
}
.bap-next-empty { padding: 22px 28px; }

/* Fully-onboarded banner. */
.bap-onboard-banner {
	display: flex; align-items: center; gap: 14px;
	background: #eef4e9;
	border: 1px solid #cfe0c6;
	border-radius: var(--bap-radius);
	padding: 16px 20px;
	margin: 0 0 20px;
}
.bap-onboard-check {
	width: 42px; height: 42px; border-radius: 50%;
	background: #5c8a4d; color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 1.3rem; flex-shrink: 0;
}
.bap-onboard-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bap-onboard-main strong { font-family: "Newsreader", Georgia, serif; font-size: 1.15rem; }
.bap-onboard-main span { font-size: 0.92rem; opacity: 0.8; }

/* Numbered homework items. */
.bap-hw-numbered { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: bap-hw; }
.bap-hw-numbered .bap-hw-item { align-items: center; }
.bap-hw-num {
	font-family: "Newsreader", Georgia, serif;
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--bap-terra);
	min-width: 2.1em;
	flex-shrink: 0;
}
.bap-hw-numbered .bap-hw-title { flex: 1; }

/* Notes: stacked cards, session-note form + dated cards. */
.bap-note-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bap-note-actions .bap-btn-secondary { margin-left: auto; }
.bap-session-note-form { margin-top: 12px; }
.bap-session-note-form textarea {
	width: 100%; border: 1px solid var(--bap-line); border-radius: 10px;
	padding: 12px; font: inherit; resize: vertical;
}
.bap-section-title { margin: 26px 0 4px; font-size: 1.25rem; }
.bap-session-note-card .bap-card-head { margin-bottom: 8px; }
.bap-session-note-body p { margin: 0 0 8px; }
.bap-session-note-body p:last-child { margin-bottom: 0; }

/* Appointment cards with date block. */
.bap-appt-card {
	display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
	background: #fbf7ef;
	border: 1px solid var(--bap-line);
	border-radius: var(--bap-radius);
	padding: 14px 18px;
	margin-top: 12px;
}
.bap-appt-date {
	text-align: center;
	min-width: 68px;
	background: #fffdf9;
	border: 1px solid var(--bap-line);
	border-radius: 12px;
	padding: 8px 6px;
	display: flex; flex-direction: column; gap: 1px;
	flex-shrink: 0;
}
.bap-appt-date .dow {
	font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
	color: var(--bap-terra);
}
.bap-appt-date .day {
	font-family: "Newsreader", Georgia, serif;
	font-size: 1.7rem; line-height: 1.1; font-weight: 600;
}
.bap-appt-date .time { font-size: 0.78rem; opacity: 0.75; }
.bap-appt-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.bap-appt-main strong { font-size: 1.05rem; }
.bap-appt-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.bap-appt-actions { margin-left: auto; }

/* Schedule calendar. */
.bap-cal-nav { display: flex; align-items: center; gap: 10px; }
.bap-cal-nav strong { font-family: "Newsreader", Georgia, serif; font-size: 1.15rem; min-width: 130px; text-align: center; }
.bap-cal {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}
.bap-cal-dow {
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.06em; text-align: center; opacity: 0.65; padding: 6px 0;
}
.bap-cal-day {
	min-height: 88px;
	background: #fffdf9;
	border: 1px solid var(--bap-line);
	border-radius: 10px;
	padding: 6px 8px;
	font-size: 0.85rem;
	text-decoration: none;
	color: inherit;
	display: block;
	overflow: hidden;
}
.bap-cal-day:hover { border-color: var(--bap-terra); color: inherit; }
.bap-cal-day.is-other { opacity: 0.35; }
.bap-cal-day.is-selected { border-color: var(--bap-terra); box-shadow: 0 0 0 2px rgba(178, 106, 72, .25); }
.bap-cal-num { font-weight: 700; }
.bap-cal-day.is-today .bap-cal-num {
	background: var(--bap-terra); color: #fffdf9;
	border-radius: 50%; width: 26px; height: 26px;
	display: inline-flex; align-items: center; justify-content: center;
}
.bap-cal-appt {
	display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	font-size: 0.76rem; margin-top: 3px; opacity: 0.85;
}
.bap-cal-more { font-size: 0.76rem; color: var(--bap-terra); font-weight: 700; }
.bap-agenda-list { list-style: none; margin: 12px 0 0; padding: 0; }
.bap-agenda-row {
	display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
	padding: 10px 0; border-top: 1px solid var(--bap-line);
}
.bap-agenda-row:first-child { border-top: 0; }
.bap-agenda-row a { color: var(--bap-terra); font-weight: 600; }
.bap-agenda-meta { opacity: 0.75; font-size: 0.9rem; }

/* Settings summary. */
.bap-settings-list { margin: 6px 0 0; }
.bap-settings-list dt { font-weight: 700; margin-top: 12px; }
.bap-settings-list dd { margin: 2px 0 0; word-break: break-all; }

/* Dashboard messages layout reuses .bap-messages-wrap (shared). */
.bap-dashboard .bap-messages-side h3 { margin: 0 0 10px; font-size: 1.15rem; }

/* Responsive: sidebar becomes a top bar. */
@media (max-width: 900px) {
	.bap-dash-shell { grid-template-columns: 1fr; }
	.bap-dash-side {
		position: static;
		display: flex; align-items: center; gap: 14px;
		padding: 14px 16px;
	}
	.bap-dash-logo { width: 44px; height: 44px; margin: 0; }
	.bap-dash-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
	.bap-dash-nav-item { padding: 8px 14px; font-size: 0.92rem; }
	.bap-dash-topbar { justify-content: flex-start; }
	.bap-cal-day { min-height: 64px; }
	.bap-appt-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
	.bap-cal-day { min-height: 52px; padding: 4px 6px; }
	.bap-cal-appt, .bap-cal-more { display: none; }
	.bap-dashboard .bap-record-head { flex-direction: column; }
	.bap-onboard-banner { flex-wrap: wrap; }
}
