/* =========================================================
   Account Page Variables — global (resolve on all HP sub-pages)
========================================================= */
:root {
	--gm-account-bg: #f4f7f5;
	--gm-account-text: #1a1f1c;
	--gm-account-heading: #173326;
	--gm-account-muted: #6f7d74;
	--gm-account-card-bg: #fff;
	--gm-account-border: #e4ece7;
	--gm-account-accent: #2d7a4f;
	--gm-account-accent-hover: #3a9e68;
	--gm-account-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	--gm-account-transition: 0.18s ease;
	--gm-account-radius: 18px;
}

.gm-account-page {
	--gm-account-bg: #f4f7f5;
	--gm-account-text: #1a1f1c;
	--gm-account-heading: #173326;
	--gm-account-muted: #6f7d74;
	--gm-account-card-bg: #fff;
	--gm-account-border: #e4ece7;
	--gm-account-accent: #2d7a4f;
	--gm-account-accent-hover: #3a9e68;
	--gm-account-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	--gm-account-transition: 0.18s ease;
	--gm-account-radius: 18px;

	background: var(--gm-account-bg);
	color: var(--gm-account-text);
	min-height: 100vh;
}

/* =========================================================
   Account Page Base
========================================================= */
.gm-account-dashboard {
	background: var(--gm-account-bg);
	margin-top: 0;
	padding-top: 0;
}

body.page-dashboard .site-content,
body.page-dashboard .content-area,
body.page-dashboard .hp-page,
body.page-template-page-dashboard .site-content,
body.page-template-page-dashboard .content-area,
body.page-template-page-dashboard .hp-page {
	margin-top: 0;
	padding-top: 0;
}

/* =========================================================
   Dashboard Context Menu
========================================================= */
.gm-hero--dashboard .gm-account-nav__row {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: center;
}

.gm-hero--dashboard .gm-account-nav__link,
.gm-hero--dashboard .gm-account-nav__link:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 4px 0;
	border: 0;
	background: transparent;
	font-family: var(--gm-sans);
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 500;
	letter-spacing: 0.01em;
	text-decoration: none;
	color: rgba(255, 255, 255, 0.96);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
	transition:
		color var(--gm-account-transition),
		opacity var(--gm-account-transition);
}

.gm-hero--dashboard .gm-account-nav__link:hover,
.gm-hero--dashboard .gm-account-nav__link:focus-visible,
.gm-hero--dashboard .gm-account-nav__link.is-active {
	color: #fff;
	text-decoration: none;
}

.gm-hero--dashboard .gm-account-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 0;
	height: 2px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	transition: width 0.2s ease;
}

.gm-hero--dashboard .gm-account-nav__link:hover::after,
.gm-hero--dashboard .gm-account-nav__link:focus-visible::after,
.gm-hero--dashboard .gm-account-nav__link.is-active::after {
	width: 100%;
}

/* =========================================================
   Stats
========================================================= */
.gm-account-section {
	position: relative;
	z-index: 3;
	margin-top: -36px;
	padding: 0 0 60px;
}

.gm-account-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: var(--gm-account-card-bg);
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-account-radius);
	box-shadow: var(--gm-account-shadow);
}

.gm-account-stat {
	padding: 24px;
	border-right: 1px solid var(--gm-account-border);
}

.gm-account-stat:last-child {
	border-right: 0;
}

.gm-account-stat__value {
	font-size: 2rem;
	color: var(--gm-account-accent);
}

.gm-account-stat__value--text {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
}

.gm-account-stat__label {
	font-size: 0.75rem;
	text-transform: uppercase;
	color: var(--gm-account-muted);
}

/* =========================================================
   Dashboard Feed
========================================================= */
.gm-account-feed {
	margin-top: 48px;
}

.gm-account-feed__section + .gm-account-feed__section {
	margin-top: 54px;
}

.gm-account-feed__header {
	display: flex;
	align-items: end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 22px;
}

.gm-account-feed__title {
	margin: 0;
	font-family: var(--gm-serif);
	font-size: clamp(2rem, 3vw, 2.75rem);
	font-weight: 400;
	line-height: 1.05;
	color: var(--gm-account-heading);
}

.gm-account-feed__link {
	font-size: 0.98rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--gm-account-accent);
	transition:
		color var(--gm-account-transition),
		opacity var(--gm-account-transition);
}

.gm-account-feed__link:hover {
	color: var(--gm-account-accent-hover);
}

.gm-account-feed__grid,
.gm-listings-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1100px) {
	.gm-account-feed__grid,
	.gm-listings-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.gm-account-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.gm-account-feed__grid,
	.gm-listings-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.gm-account-section {
		margin-top: -18px;
	}

	.gm-account-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.gm-account-stat {
		border-right: 1px solid var(--gm-account-border);
		border-bottom: 1px solid var(--gm-account-border);
	}

	.gm-account-stat:nth-child(2n) {
		border-right: 0;
	}

	.gm-account-stat:nth-last-child(-n+2) {
		border-bottom: 0;
	}

	.gm-account-feed {
		margin-top: 36px;
	}

	.gm-account-feed__section + .gm-account-feed__section {
		margin-top: 40px;
	}

	.gm-account-feed__grid,
	.gm-listings-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}
/* =========================================================
   SECTION A — Account sub-page layout
   Collapse to single column when HivePress sidebar is empty
========================================================= */

/* Centred layout matching site container — account pages use the same 1240px max-width */
body.hp-template--messages-thread-page .hp-page,
body.hp-template--listings-edit-page .hp-page,
body.hp-template--listings-favorite-page .hp-page {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

body.hp-template--messages-thread-page .hp-page__sidebar,
body.hp-template--listings-edit-page .hp-page__sidebar,
body.hp-template--messages-view-page .hp-page__sidebar,
body.hp-template--listings-favorite-page .hp-page__sidebar {
	display: none;
}

body.hp-template--messages-thread-page .hp-page__content,
body.hp-template--listings-edit-page .hp-page__content,
body.hp-template--messages-view-page .hp-page__content,
body.hp-template--listings-favorite-page .hp-page__content {
	flex: 0 0 100%;
	max-width: 100%;
	padding: 0 var(--gm-page-inset);
	box-sizing: border-box;
}

/* =========================================================
   SECTION B — Account subnav bar
========================================================= */
.gm-account-subnav {
	display: flex;
	align-items: center;
	gap: 0;
	background: var(--gm-white);
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 32px;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	padding-top: 0;
	padding-bottom: 0;
	padding-left: calc(50vw - 50%);
	padding-right: calc(50vw - 50%);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.gm-account-subnav::-webkit-scrollbar {
	display: none;
}

.gm-account-subnav .gm-account-subnav__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 14px 20px 14px 0;
	font-size: .9rem;
	font-weight: 400;
	color: #4a4a4a;
	text-decoration: none;
	border-bottom: 2.5px solid transparent;
	margin-bottom: -1.5px;
	white-space: nowrap;
	letter-spacing: 0.01em;
	position: relative;
	transition: color var(--gm-transition-fast),
	            border-color var(--gm-transition-fast);
}

.gm-account-subnav .gm-account-subnav__link:hover {
	color: #1a3a2a;
	text-decoration: none;
}

.gm-account-subnav .gm-account-subnav__link.is-active {
	color: #1a3a2a;
	border-bottom-color: var(--gm-green-dark);
	font-weight: 600;
}

.gm-account-subnav__link::after {
	content: attr(data-text);
	font-weight: 600;
	height: 0;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
	display: block;
	position: absolute;
}

.gm-account-subnav__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--gm-green);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	line-height: 1;
}

/* =========================================================
   SECTION C — Account page header title
========================================================= */
.gm-account-page-header {
	padding-top: calc(var(--gm-header-height));
	margin-bottom: 0;
}

.gm-account-page-header__title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--gm-ink);
	margin: 0 0 24px;
	font-family: var(--gm-serif);
}

/* =========================================================
   SECTION D — My Listings table → card rows
========================================================= */
.hp-template--listings-edit-page .hp-messages,
.hp-template--listings-edit-page .hp-table {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	border: none;
}

.hp-template--listings-edit-page .hp-message,
.hp-template--listings-edit-page tr {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--gm-white);
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-radius-lg);
}

/* =========================================================
   SECTION E — Inbox thread rows
========================================================= */
.hp-template--messages-view-page .hp-messages {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-radius-lg);
	overflow: hidden;
}

.hp-template--messages-view-page .hp-message {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--gm-white);
	border-bottom: 1px solid var(--gm-account-border);
	text-decoration: none;
	transition: background var(--gm-transition-fast);
}

.hp-template--messages-view-page .hp-message:last-child {
	border-bottom: none;
}

.hp-template--messages-view-page .hp-message:hover {
	background: var(--gm-green-pale);
}

.hp-template--messages-view-page .hp-message:not(.hp-message--read) {
	background: #f0f7f0;
}

.hp-template--messages-view-page .hp-message__sender {
	flex: 1;
	font-weight: 600;
	color: var(--gm-ink);
}

.hp-template--messages-view-page .hp-message__sender a {
	text-decoration: none;
	color: inherit;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hp-template--messages-view-page .hp-message__listing {
	font-size: 0.82rem;
	color: var(--gm-ink-2);
}

.hp-template--messages-view-page .hp-message__listing a {
	color: var(--gm-green-dark);
	text-decoration: none;
}

.hp-template--messages-view-page .hp-message__date {
	font-size: 0.8rem;
	color: var(--gm-ink-3);
	white-space: nowrap;
}

.hp-template--messages-view-page .hp-message--read .hp-message__sender {
	font-weight: 400;
}

.hp-template--messages-view-page .fa-envelope {
	display: none;
}

.hp-template--messages-view-page .hp-message:not(.hp-message--read)
	.hp-message__sender::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gm-green);
	flex-shrink: 0;
}

/* =========================================================
   SECTION F — Empty states
========================================================= */
.hp-template--messages-view-page .hp-messages:empty::after,
.hp-template--listings-favorite-page .hp-listings:empty::after {
	display: block;
	padding: 48px 20px;
	text-align: center;
	color: var(--gm-ink-2);
	font-size: 0.9rem;
}

.hp-template--messages-view-page .hp-messages:empty::after {
	content: 'No messages yet. When someone contacts you about a listing, their message will appear here.';
}

.hp-template--listings-favorite-page .hp-listings:empty::after {
	content: 'No saved listings yet. Tap the heart icon on any listing to save it here.';
}

/* =========================================================
   SECTION G — Mobile
========================================================= */
@media (max-width: 768px) {
	.gm-account-subnav__link {
		padding: 8px 12px;
		font-size: 0.8rem;
	}

	.gm-account-page-header__title {
		font-size: 1.5rem;
	}
}

/* =========================================================
   SECTION H — Empty state
========================================================= */
.gm-empty-state {
	padding: 48px 20px;
	text-align: center;
	border: 1px dashed var(--gm-account-border);
	border-radius: var(--gm-radius-lg);
	margin-bottom: 60px;
}

.gm-empty-state__text {
	color: var(--gm-ink-2);
	font-size: 0.9rem;
	margin: 0;
}

.gm-empty-state__cta {
	margin-top: 20px;
}

/* =========================================================
   SECTION I — Saved Listings grid
========================================================= */

/* Zero ALL .hp-row margins on this page — the outer page-level .hp-row from HP's
   Bootstrap grid has margin: -1rem on both sides, which inflates .hp-page__content
   (flex: 0 0 100%) to viewport + 32px, bleeding 16px left and right. */
body.hp-template--listings-favorite-page .hp-row {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.hp-template--listings-favorite-page .hp-listings.hp-grid .hp-row {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	column-gap: 24px;
	row-gap: 20px;
	align-items: stretch;
}

body.hp-template--listings-favorite-page .hp-listings.hp-grid .hp-col-sm-6 {
	max-width: none !important;
	padding: 0 !important;
	flex-basis: auto !important;
}

body.hp-template--listings-favorite-page .hp-grid__item {
	display: flex;
	width: 100%;
	overflow: hidden;
	margin-bottom: 0 !important;
}

body.hp-template--listings-favorite-page .gm-listing-card {
	height: auto;
}

/* Take the img out of flow so aspect-ratio on .gm-listing-card__media is the sole
   height source. Without this, img { height: 100% } creates a circular dependency
   when there is no definite parent height (height: auto card breaks the chain). */
body.hp-template--listings-favorite-page .gm-listing-card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

body.hp-template--listings-favorite-page .gm-listing-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Card wrapper width — gm-listing-card is a flex item inside .hp-grid__item (display:flex)
   and needs explicit width to fill the cell rather than shrink to content. */
body.hp-template--listings-favorite-page .hp-listing--view-block.gm-listing-card {
	width: 100%;
}

/* Zero HP's default margin-bottom: 2rem on the article element inside the grid cell. */
body.hp-template--listings-favorite-page .hp-listing--view-block {
	margin-bottom: 0 !important;
}

@media (max-width: 768px) {
	body.hp-template--listings-favorite-page .hp-listings.hp-grid .hp-row {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	body.hp-template--listings-favorite-page .hp-grid__item {
		width: 100%;
	}

	body.hp-template--listings-favorite-page .hp-listings.hp-grid .hp-row {
		grid-template-columns: 1fr !important;
		column-gap: 0;
	}
}

/* =========================================================
   SECTION I — Inbox thread list (messages_thread_page)
========================================================= */

/* Page content max-width + padding */
.hp-template--messages-thread-page .hp-page__content {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 40px;
	box-sizing: border-box;
}

/* Table → flex column */
.hp-template--messages-thread-page .hp-messages.hp-table {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-radius-lg, 12px);
	overflow: hidden;
}

/* Thread rows */
.hp-template--messages-thread-page .hp-message--thread-block {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	background: #fff;
	border: none;
	border-bottom: 1px solid var(--gm-account-border);
	transition: background var(--gm-transition-fast, 0.18s ease);
}

.hp-template--messages-thread-page .hp-message--thread-block:last-child {
	border-bottom: none;
}

.hp-template--messages-thread-page .hp-message--thread-block:hover {
	background: #f7faf7;
}

/* Unread row — green left accent + tint */
.hp-template--messages-thread-page .hp-message--thread-block:not(.hp-message--read) {
	border-left: 3px solid var(--gm-account-accent, #2d7a4f);
	background: #f8fbf8;
}

/* Avatar circle */
.gm-message-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* Sender cell — fixed width, avatar + name side by side */
.hp-template--messages-thread-page .hp-message__sender {
	flex: 0 0 180px;
}

.hp-template--messages-thread-page .gm-message-sender-link,
.hp-template--messages-thread-page .gm-message-sender-link:visited {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--gm-account-text, #1a1f1c);
}

.hp-template--messages-thread-page .gm-message-sender-name {
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Unread — sender name bold + darker */
.hp-template--messages-thread-page .hp-message--thread-block:not(.hp-message--read) .gm-message-sender-name {
	font-weight: 700;
	color: var(--gm-account-heading, #173326);
}

/* Listing cell */
.hp-template--messages-thread-page .hp-message__listing {
	flex: 0 0 auto;
	max-width: 160px;
	font-size: 0.8rem;
}

.hp-template--messages-thread-page .hp-message__listing a,
.hp-template--messages-thread-page .hp-message__listing a:visited {
	color: var(--gm-account-accent, #2d7a4f);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

.hp-template--messages-thread-page .hp-message__listing .hp-icon {
	display: none;
}

/* Preview cell — takes remaining space */
.hp-template--messages-thread-page .gm-message-preview-cell {
	flex: 1;
	min-width: 0;
}

.gm-message-preview {
	margin: 0;
	font-size: 0.875rem;
	color: var(--gm-account-muted, #6f7d74);
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Timestamp cell */
.hp-template--messages-thread-page .hp-message__sent-date {
	flex: 0 0 auto;
	font-size: 0.78rem;
	color: var(--gm-account-muted, #6f7d74);
	white-space: nowrap;
	text-align: right;
}

/* All / Unread filter tabs */
.gm-inbox-filter {
	display: flex;
	gap: 6px;
	margin-bottom: 16px;
}

.gm-inbox-filter__tab {
	display: inline-flex;
	align-items: center;
	padding: 6px 16px;
	border-radius: 20px;
	border: 1px solid var(--gm-account-border, #e4ece7);
	background: transparent;
	font-family: var(--gm-sans);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--gm-account-muted, #6f7d74);
	cursor: pointer;
	line-height: 1;
	transition:
		background var(--gm-transition-fast, 0.18s ease),
		color var(--gm-transition-fast, 0.18s ease),
		border-color var(--gm-transition-fast, 0.18s ease);
}

.gm-inbox-filter__tab:hover {
	color: var(--gm-account-text, #1a1f1c);
	border-color: var(--gm-account-text, #1a1f1c);
}

.gm-inbox-filter__tab.is-active {
	background: var(--gm-account-accent, #2d7a4f);
	color: #fff;
	border-color: var(--gm-account-accent, #2d7a4f);
	font-weight: 600;
}

/* Mobile */
@media (max-width: 640px) {
	.hp-template--messages-thread-page .hp-page__content {
		padding: 0 16px;
	}

	.hp-template--messages-thread-page .hp-message--thread-block {
		padding: 14px;
	}

	.hp-template--messages-thread-page .hp-message__listing {
		display: none;
	}

	.hp-template--messages-thread-page .hp-message__sender {
		flex: 0 0 auto;
		max-width: 130px;
	}
}

/* =========================================================
   SECTION J — Profile page  (/account/profile/)
   All selectors prefixed .gm-profile-* to avoid collisions.
========================================================= */

/* ── Outer wrapper ─────────────────────────────────────── */
.gm-profile-wrap {
	padding-bottom: 80px;
}

/* ── Two-column layout: side nav + main ────────────────── */
.gm-profile-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 40px;
	align-items: flex-start;
}

/* ── Side nav ──────────────────────────────────────────── */
.gm-profile-side-nav {
	position: sticky;
	top: calc(var(--gm-header-height, 72px) + 60px);
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.gm-profile-side-nav__group {
	margin-top: 18px;
}

.gm-profile-side-nav__group:first-child {
	margin-top: 0;
}

.gm-profile-side-nav__label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--gm-account-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0 12px;
	margin-bottom: 4px;
}

.gm-profile-side-nav__link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 12px;
	border-radius: var(--gm-radius-sm, 10px);
	color: var(--gm-account-text);
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none;
	transition: background var(--gm-account-transition), color var(--gm-account-transition);
}

.gm-profile-side-nav__link svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--gm-account-muted);
}

.gm-profile-side-nav__link:hover {
	background: var(--gm-account-bg);
	color: var(--gm-account-heading);
}

.gm-profile-side-nav__link.is-active {
	background: #eaf4ee;
	color: var(--gm-account-accent);
	font-weight: 600;
}

.gm-profile-side-nav__link.is-active svg {
	color: var(--gm-account-accent);
}

/* ── Hero card ─────────────────────────────────────────── */
.gm-profile-hero {
	background: var(--gm-account-card-bg);
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-account-radius);
	overflow: hidden;
	margin-bottom: 20px;
	box-shadow: var(--gm-account-shadow);
}

.gm-profile-hero__cover {
	height: 160px;
	background: linear-gradient(135deg, #7a8a52 0%, #3d5b3a 60%, #1f3324 100%);
}

.gm-profile-hero__body {
	display: flex;
	align-items: flex-end;
	gap: 20px;
	padding: 0 24px 20px;
	margin-top: -42px;
	flex-wrap: wrap;
}

.gm-profile-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	background: linear-gradient(135deg, #3a9e68, #1f5a36);
	border: 4px solid var(--gm-account-card-bg);
	box-shadow: var(--gm-account-shadow);
	display: grid;
	place-items: center;
	flex-shrink: 0;
	overflow: hidden;
}

.gm-profile-avatar__initial {
	font-family: var(--gm-serif, "DM Serif Display", Georgia, serif);
	font-size: 2.6rem;
	color: #fff;
	line-height: 1;
}

.gm-profile-avatar__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gm-profile-hero__info {
	flex: 1;
	min-width: 0;
	padding-bottom: 4px;
}

.gm-profile-hero__name {
	font-family: var(--gm-serif, "DM Serif Display", Georgia, serif);
	font-size: 1.75rem;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 6px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	color: var(--gm-account-heading);
}

.gm-profile-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 24px;
	padding: 0 10px;
	background: #eaf4ee;
	color: #1f6a3b;
	border-radius: 999px;
	font-family: var(--gm-sans, "DM Sans", system-ui, sans-serif);
	font-size: 0.74rem;
	font-weight: 600;
}

.gm-profile-verified-badge svg {
	width: 11px;
	height: 11px;
}

.gm-profile-hero__meta {
	color: var(--gm-account-muted);
	font-size: 0.88rem;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.gm-profile-hero__meta span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.gm-profile-hero__meta svg {
	width: 13px;
	height: 13px;
}

.gm-profile-hero__meta a {
	color: var(--gm-account-accent);
	font-weight: 500;
	text-decoration: none;
}

.gm-profile-hero__meta a:hover {
	text-decoration: underline;
}

/* ── Section cards ─────────────────────────────────────── */
.gm-profile-section {
	background: var(--gm-account-card-bg);
	border: 1px solid var(--gm-account-border);
	border-radius: var(--gm-account-radius);
	box-shadow: var(--gm-account-shadow);
	margin-bottom: 20px;
	overflow: hidden;
	scroll-margin-top: 160px;
}

.gm-profile-section__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 24px 4px;
}

.gm-profile-section__title {
	font-family: var(--gm-serif, "DM Serif Display", Georgia, serif);
	font-size: 1.35rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 4px;
	color: var(--gm-account-heading);
}

.gm-profile-section__desc {
	color: var(--gm-account-muted);
	font-size: 0.88rem;
	margin: 0;
	line-height: 1.5;
}

.gm-profile-section__body {
	padding: 18px 24px 24px;
}

.gm-profile-section__body--tight {
	padding-top: 8px;
	padding-bottom: 8px;
}

/* Danger zone */
.gm-profile-section--danger .gm-profile-section__title {
	color: #8b2e2a;
}

.gm-profile-section--danger {
	border-color: #f1c7c3;
}

.gm-profile-section--locked {
	opacity: 0.55;
	pointer-events: none;
}

.gm-profile-locked-note {
	font-size: 0.88rem;
	color: var(--gm-account-muted);
	margin: 0;
}

/* ── Form field grid ───────────────────────────────────── */
.gm-profile-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}

.gm-profile-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gm-profile-field--full {
	grid-column: 1 / -1;
}

.gm-profile-field label {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--gm-account-text);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.gm-profile-field__hint {
	font-weight: 400;
	color: var(--gm-account-muted);
	font-size: 0.78rem;
}

.gm-profile-field input[type="text"],
.gm-profile-field input[type="email"],
.gm-profile-field input[type="tel"],
.gm-profile-field input[type="url"],
.gm-profile-field input[type="password"],
.gm-profile-field select,
.gm-profile-field textarea {
	width: 100%;
	height: 42px;
	padding: 0 13px;
	border: 1px solid var(--gm-account-border);
	background: #fff;
	border-radius: 8px;
	font-size: 0.92rem;
	color: var(--gm-account-text);
	font-family: inherit;
	transition: border-color var(--gm-account-transition), box-shadow var(--gm-account-transition);
	box-sizing: border-box;
}

.gm-profile-field textarea {
	height: auto;
	min-height: 100px;
	padding: 10px 13px;
	line-height: 1.55;
	resize: vertical;
}

.gm-profile-field input:focus,
.gm-profile-field select:focus,
.gm-profile-field textarea:focus {
	outline: none;
	border-color: var(--gm-account-accent);
	box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.12);
}

.gm-profile-field input[disabled] {
	background: var(--gm-account-bg);
	color: var(--gm-account-muted);
	cursor: not-allowed;
}

.gm-profile-field__help {
	font-size: 0.78rem;
	color: var(--gm-account-muted);
}

.gm-profile-bio-count {
	font-size: 0.76rem;
	color: var(--gm-account-muted);
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

/* Input prefix / suffix */
.gm-profile-input-prefix {
	position: relative;
}

.gm-profile-input-prefix__pre {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gm-account-muted);
	font-size: 0.9rem;
	pointer-events: none;
	line-height: 1;
}

.gm-profile-input-prefix input {
	padding-left: 38px !important;
}

.gm-profile-input-suffix {
	position: relative;
}

.gm-profile-input-suffix__unit {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gm-account-muted);
	font-size: 0.84rem;
	pointer-events: none;
}

/* Select wrapper with custom arrow */
.gm-profile-select-wrap {
	position: relative;
}

.gm-profile-select-wrap select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 34px !important;
	cursor: pointer;
}

.gm-profile-select-wrap::after {
	content: "";
	position: absolute;
	right: 13px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--gm-account-muted);
	border-bottom: 2px solid var(--gm-account-muted);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

/* ── Chip checkboxes / radios ──────────────────────────── */
.gm-profile-chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.gm-profile-chip {
	position: relative;
	cursor: pointer;
}

.gm-profile-chip input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
	margin: 0;
}

.gm-profile-chip span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 14px;
	border: 1px solid var(--gm-account-border);
	background: #fff;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--gm-account-text);
	transition: all var(--gm-account-transition);
	user-select: none;
}

.gm-profile-chip input:checked + span {
	background: #eaf4ee;
	border-color: var(--gm-account-accent);
	color: #1f5a36;
	font-weight: 600;
}

.gm-profile-chip:hover span {
	border-color: var(--gm-account-accent);
}

.gm-profile-chip input:focus-visible + span {
	outline: 2px solid var(--gm-account-accent);
	outline-offset: 2px;
}

/* ── Privacy toggle rows ───────────────────────────────── */
.gm-profile-toggle-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(23, 33, 23, 0.06);
}

.gm-profile-toggle-row:last-child {
	border-bottom: none;
}

.gm-profile-toggle-row__text strong {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--gm-account-heading);
	margin-bottom: 2px;
}

.gm-profile-toggle-row__text p {
	margin: 0;
	font-size: 0.84rem;
	color: var(--gm-account-muted);
	line-height: 1.5;
}

.gm-profile-toggle {
	position: relative;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
	display: inline-block;
}

.gm-profile-toggle input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
	z-index: 2;
	margin: 0;
	width: 100%;
	height: 100%;
}

.gm-profile-toggle__track {
	position: absolute;
	inset: 0;
	background: #cfd6d2;
	border-radius: 999px;
	transition: background var(--gm-account-transition);
}

.gm-profile-toggle__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	transition: left var(--gm-account-transition);
}

.gm-profile-toggle input:checked ~ .gm-profile-toggle__track {
	background: var(--gm-account-accent);
}

.gm-profile-toggle input:checked ~ .gm-profile-toggle__knob {
	left: 21px;
}

.gm-profile-toggle input:focus-visible ~ .gm-profile-toggle__track {
	outline: 2px solid var(--gm-account-accent);
	outline-offset: 2px;
}

/* ── Banners (success / warn / info / error) ───────────── */
.gm-profile-banner {
	display: flex;
	align-items: flex-start;
	gap: 13px;
	padding: 14px 16px;
	border-radius: 10px;
	font-size: 0.88rem;
	line-height: 1.5;
	margin-bottom: 20px;
}

/* theme.css sets position:fixed on .gm-profile-banner for the dashboard completion
   banner; reset it here so profile-page inline banners stay in document flow. */
.gm-profile-wrap .gm-profile-banner {
	position: static;
}

.gm-profile-banner svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 1px;
}

.gm-profile-banner__text strong {
	display: block;
	font-weight: 600;
	margin-bottom: 2px;
}

.gm-profile-banner--success {
	background: #edf8f0;
	border: 1px solid #cfe7d5;
	color: #1f6a3b;
}

.gm-profile-banner--warn {
	background: #fff8e6;
	border: 1px solid #f0dca0;
	color: #7a5a14;
}

.gm-profile-banner--info {
	background: #eaf4ee;
	border: 1px solid rgba(45, 122, 79, 0.28);
	color: #173326;
}

.gm-profile-banner--error {
	background: #fff3f2;
	border: 1px solid #f1c7c3;
	color: #8b2e2a;
}

.gm-profile-banner--info a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* ── Verification section ──────────────────────────────── */
.gm-profile-verify-intro {
	font-size: 0.9rem;
	color: var(--gm-account-text);
	margin: 0 0 16px;
	line-height: 1.6;
}

.gm-profile-verify-note {
	font-size: 0.86rem;
	color: var(--gm-account-muted);
	margin: 0;
}

.gm-profile-verify-note a {
	color: var(--gm-account-accent);
	font-weight: 500;
	text-decoration: none;
}

/* ── Buttons (scoped to profile context) ───────────────── */
.gm-profile-wrap .gm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 42px;
	padding: 0 20px;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--gm-account-transition);
	border: 1px solid transparent;
	text-decoration: none;
	font-family: inherit;
}

.gm-profile-wrap .gm-btn--primary {
	background: var(--gm-account-accent);
	color: #fff;
	border-color: var(--gm-account-accent);
}

.gm-profile-wrap .gm-btn--primary:hover {
	background: var(--gm-account-accent-hover);
	border-color: var(--gm-account-accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(45, 122, 79, 0.22);
}

.gm-profile-wrap .gm-btn--sm {
	height: 34px;
	padding: 0 14px;
	font-size: 0.84rem;
}

/* ── Primary save actions bar ──────────────────────────── */
.gm-profile-save-actions {
	display: flex;
	justify-content: flex-end;
	padding: 8px 0 16px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
	.gm-profile-layout {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.gm-profile-side-nav {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 4px;
		margin-bottom: 20px;
		padding-bottom: 16px;
		border-bottom: 1px solid var(--gm-account-border);
	}

	.gm-profile-side-nav__group {
		display: flex;
		align-items: center;
		gap: 4px;
		margin-top: 0;
	}

	.gm-profile-side-nav__label {
		display: none;
	}

	.gm-profile-side-nav__link {
		padding: 6px 10px;
		font-size: 0.82rem;
		white-space: nowrap;
	}

	.gm-profile-side-nav__link svg {
		display: none;
	}
}

@media (max-width: 640px) {
	.gm-profile-field-row {
		grid-template-columns: 1fr;
	}

	.gm-profile-hero__body {
		margin-top: -32px;
	}

	.gm-profile-avatar {
		width: 82px;
		height: 82px;
	}

	.gm-profile-avatar__initial {
		font-size: 2rem;
	}

	.gm-profile-hero__name {
		font-size: 1.4rem;
	}
}
