/* Palette: reuses the exact sage-to-ink gradient already established in
   login_theme.css's background art (--wb-sage/-mid/-ink/-ink-dark below
   correspond to that SVG's own stop colors), rather than introducing a
   second, disconnected color scheme. Previously the whole customer portal
   ran on --wb-ink alone (#143631, the *darkest* stop — effectively black-
   green) for every heading/button/accent; the staff Desk theme's actual
   default is the much lighter #8aad9f sage, with dark ink reserved for
   text only. This shifts the portal's primary surfaces/accents toward
   that same lighter sage family and keeps the darkest tone for text,
   matching how the Desk theme already splits the two. */
/* Defined on :root (not just .wb-portal) so page-level rules like the body
   background and the portal nav bar -- both ancestors/siblings of .wb-portal
   rather than descendants -- can use these tokens too. */
:root {
	--wb-sage: #8aad9f;
	--wb-sage-mid: #6f9c8e;
	--wb-ink: #2a5850;
	--wb-ink-dark: #1c4a42;
	--wb-sage-tint: #f4f9f7;
	/* Same orange already used for links/accents elsewhere on this site
	   (login_theme.css) -- reused here as the dashboard's one "act now"
	   color rather than introducing a second accent hue. */
	--wb-orange: #d9660f;
	--wb-orange-tint: #fbeade;
	--wb-warning: #a8660f;
	--wb-warning-tint: #faeed9;
	--wb-success: #4a7c59;
	--wb-success-tint: #e8f2ea;
	--wb-border: #e4e0d5;
}

/* Sage and Silver Furnished Homes: a second brand sharing this same
   portal.css (hooks.py's static includes can't branch per-site -- see
   brand.js's own comment -- so both brands' colors live in this one
   file, gated by [data-brand] rather than a second CSS file). Colors
   sampled directly from the live marketing site's own rendered CSS
   (button background #566149, heading ink #33402e, body background
   #f7f3ea), not guessed -- see https://silver-and-sage.greenback05.workers.dev. */
html[data-brand="sage_and_silver"] {
	--wb-sage: #7d8a6c;
	--wb-sage-mid: #566149;
	--wb-ink: #33402e;
	--wb-ink-dark: #232b1f;
	--wb-sage-tint: #f7f3ea;
	--wb-orange: #a8642f;
	--wb-orange-tint: #f6e8dc;
	--wb-warning: #8a5a2f;
	--wb-warning-tint: #f2e6d8;
	--wb-success: #4a6b45;
	--wb-success-tint: #e8efe4;
	--wb-border: #ddd6c4;
}

/* Website Theme's compiled CSS (theme_url) can't be regenerated per-brand
   without `node` on PATH (see website_theme_override.py's own docstring) --
   both sites' Website Theme records point at the same pre-built
   whitebird_theme_compiled.css, which hardcodes Whitebird's navbar green as
   literal !important rules, not variables. A previous session already hit
   this exact conflict (see project_portal_mobile_branding_fixes memory) and
   had to fix the live theme record directly since a plain override file
   didn't reliably win. Overriding it here too, loaded after that compiled
   file in web_include_css, with matching !important + specificity. */
html[data-brand="sage_and_silver"] .navbar {
	background-color: #566149 !important;
}
html[data-brand="sage_and_silver"] .navbar .navbar-brand,
html[data-brand="sage_and_silver"] .navbar a {
	color: #ffffff !important;
}
html[data-brand="sage_and_silver"] .navbar .dropdown-menu a {
	color: #33402e !important;
}

.wb-portal h2 {
	color: var(--wb-ink);
	font-weight: 600;
	margin-bottom: 4px;
}

.wb-card-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 20px;
}

.wb-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-left: 3px solid var(--wb-sage);
	border-radius: 8px;
	padding: 16px 18px;
}

.wb-doc-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.wb-card-block {
	display: block;
	margin-top: 20px;
}

.wb-card-title {
	font-weight: 600;
	color: var(--wb-ink);
}

.wb-card-sub {
	color: #74808b;
	font-size: 13px;
	margin-top: 2px;
}

.wb-empty {
	margin-top: 24px;
	padding: 24px;
	text-align: center;
	color: #74808b;
	background: var(--wb-sage-tint);
	border-radius: 8px;
}

.wb-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #f4f1ec;
	color: var(--wb-ink);
}

.wb-badge-active,
.wb-badge-completed,
.wb-badge-invoiced {
	background: #e1f5ee;
	color: #085041;
}

.wb-badge-quoted,
.wb-badge-upcoming {
	background: #faeeda;
	color: #633806;
}

.wb-badge-cancelled,
.wb-badge-terminated {
	background: #fcebeb;
	color: #791f1f;
}

.wb-badge-paid {
	background: #e1f5ee;
	color: #085041;
}

.wb-badge-unpaid,
.wb-badge-partly-paid {
	background: #faeeda;
	color: #633806;
}

.wb-badge-overdue {
	background: #fcebeb;
	color: #791f1f;
}

.wb-lease-meta {
	display: flex;
	gap: 28px;
	margin-top: 14px;
}

.wb-label {
	display: block;
	font-size: 12px;
	color: #74808b;
	margin-bottom: 4px;
}

.wb-lease-invoices {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}

.wb-invoice-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
}

.wb-stat-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 20px 0;
}

.wb-stat {
	background: var(--wb-sage-tint);
	border-radius: 8px;
	padding: 16px;
	text-align: center;
}

.wb-stat-link {
	display: block;
	text-decoration: none;
	transition: box-shadow 0.15s ease;
}

.wb-stat-link:hover {
	box-shadow: 0 2px 10px rgba(42, 88, 80, 0.16);
	text-decoration: none;
}

.wb-stat-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--wb-ink);
}

.wb-stat-label {
	font-size: 13px;
	color: #74808b;
	margin-top: 2px;
}

.wb-quick-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin-top: 12px;
}

.wb-quick-link {
	flex-direction: column;
	align-items: flex-start;
	text-decoration: none;
	transition: box-shadow 0.15s ease;
}

.wb-quick-link:hover {
	box-shadow: 0 2px 10px rgba(42, 88, 80, 0.16);
	text-decoration: none;
}

/* Quick-link cards had no visual anchor beyond a title/subtitle pair —
   Tabler Icons (already vendored for Desk, see hooks.py) reused here so
   each destination reads at a glance instead of purely by its label. */
.wb-quick-link-icon {
	font-size: 26px;
	color: var(--wb-sage);
	margin-bottom: 10px;
}

/* --- Dashboard redesign (2026-08) ------------------------------------------
   "Next up" hero card: one clear next action above the stat row instead of
   three equal-weight numbers with no obvious first move. */
.wb-next-up {
	margin-top: 16px;
	background: #ffffff;
	border: 1px solid var(--wb-border);
	border-left: 4px solid var(--wb-orange);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(28, 74, 66, 0.06), 0 6px 20px rgba(28, 74, 66, 0.05);
	padding: 18px 20px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.wb-next-up-neutral {
	border-left-color: var(--wb-sage);
}

.wb-next-up-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wb-orange-tint);
	color: var(--wb-orange);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
}

.wb-next-up-icon.wb-next-up-icon-neutral {
	background: var(--wb-sage-tint);
	color: var(--wb-sage-mid);
}

.wb-next-up-body {
	flex: 1;
	min-width: 0;
}

.wb-next-up-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wb-orange);
	font-weight: 700;
	margin: 0 0 3px;
}

.wb-next-up-label.wb-next-up-label-neutral {
	color: var(--wb-sage-mid);
}

.wb-next-up-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 2px;
	color: var(--wb-ink);
}

.wb-next-up-sub {
	font-size: 13px;
	color: #74808b;
	margin: 0;
}

/* Pills: state as color + shape, not just a number, so status reads at a
   glance in the properties row and activity timeline. */
.wb-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wb-pill-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

.wb-pill-success { background: var(--wb-success-tint); color: var(--wb-success); }
.wb-pill-success .wb-pill-dot { background: var(--wb-success); }
.wb-pill-warning { background: var(--wb-warning-tint); color: var(--wb-warning); }
.wb-pill-warning .wb-pill-dot { background: var(--wb-warning); }
.wb-pill-sage { background: var(--wb-sage-tint); color: var(--wb-sage-mid); }
.wb-pill-sage .wb-pill-dot { background: var(--wb-sage-mid); }

/* Property cards: photo-forward horizontal row instead of a plain list --
   these are homes people recognize by sight faster than by address text. */
.wb-prop-scroll {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 6px;
	margin: 0 -2px;
}

.wb-prop-card {
	flex: 0 0 230px;
	border: 1px solid var(--wb-border);
	border-top: 3px solid var(--wb-sage);
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(28, 74, 66, 0.06), 0 6px 20px rgba(28, 74, 66, 0.05);
}

.wb-prop-card-success {
	border-top-color: var(--wb-success);
}

.wb-prop-photo {
	height: 120px;
	width: 100%;
	background: var(--wb-sage-tint) center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wb-sage);
	font-size: 26px;
}

.wb-prop-body {
	padding: 12px 14px 14px;
}

.wb-prop-title {
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 2px;
	color: var(--wb-ink);
}

.wb-prop-addr {
	font-size: 12px;
	color: #74808b;
	margin: 0 0 10px;
}

/* Activity timeline: a connected rail of dots reads as "things happening
   over time" much faster than a flat list of unrelated rows. */
.wb-timeline {
	display: flex;
	flex-direction: column;
}

.wb-tl-item {
	display: flex;
	gap: 14px;
}

.wb-tl-rail {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 20px;
	flex-shrink: 0;
}

.wb-tl-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-top: 5px;
	flex-shrink: 0;
	background: var(--tl-color, var(--wb-sage-mid));
}

.wb-tl-line {
	width: 1px;
	flex: 1;
	background: var(--wb-border);
	margin-top: 4px;
	min-height: 22px;
}

.wb-tl-item:last-child .wb-tl-line {
	display: none;
}

.wb-tl-card {
	flex: 1;
	background: #ffffff;
	border: 1px solid var(--wb-border);
	border-left: 3px solid var(--tl-color, var(--wb-sage-mid));
	border-radius: 12px;
	padding: 13px 15px;
	margin-bottom: 14px;
}

.wb-tl-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.wb-tl-title {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wb-ink);
}

.wb-tl-meta {
	font-size: 12px;
	color: #74808b;
	margin-top: 3px;
}

/* Dashboard two-column layout: main column + a narrower sidebar for quick
   actions and recent documents. */
.wb-dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 28px;
	align-items: start;
	margin-top: 8px;
}

.wb-side-card {
	background: #ffffff;
	border: 1px solid var(--wb-border);
	border-radius: 14px;
	padding: 16px;
	margin-bottom: 16px;
}

.wb-side-card h3 {
	font-size: 12.5px;
	margin: 0 0 12px;
	color: #74808b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
}

.wb-quick-action {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 4px;
	border-bottom: 1px solid var(--wb-border);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wb-ink);
	cursor: pointer;
	text-decoration: none;
}

.wb-quick-action:last-child {
	border-bottom: none;
}

.wb-quick-action:hover {
	color: var(--wb-ink-dark);
	text-decoration: none;
}

.wb-qa-icon {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--wb-sage-tint);
	color: var(--wb-sage-mid);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	flex-shrink: 0;
}

.wb-doc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--wb-border);
	gap: 10px;
}

.wb-doc-row:last-child {
	border-bottom: none;
}

.wb-doc-row-name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wb-ink);
}

.wb-doc-row-meta {
	font-size: 11px;
	color: #98a29c;
}

.wb-doc-row-link {
	font-size: 11.5px;
	color: var(--wb-sage-mid);
	font-weight: 700;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

/* Small clickable photo thumbnails on the Service Jobs page -- tenant-
   submitted maintenance photos (upload_maintenance_photo, rbac.py) and any
   staff-attached job photos, opened via the same View/Download flow every
   other document uses. */
.wb-job-photos {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.wb-job-thumb-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.wb-job-thumb {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	border: 1px solid var(--wb-border);
	background-color: var(--wb-sage-tint);
	background-size: cover;
	background-position: center;
	padding: 0;
	cursor: pointer;
}

.wb-job-thumb-date {
	font-size: 11px;
	color: #98a29c;
}

/* Shared section-header style for any grouped list of documents/photos --
   used identically on the Documents page's category groups and here, so a
   group of files reads the same way no matter which portal page it's on. */
.wb-doc-group-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--wb-ink);
	margin-bottom: 10px;
}

.wb-doc-group-label .wb-doc-group-count {
	color: #98a29c;
	font-weight: 400;
}

/* Expandable "Details" section on Service Job / Invoice cards -- notes
   text and itemized line items that don't need to be visible by default
   but are one click away rather than requiring a separate detail page. */
.wb-job-notes {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--wb-border);
	font-size: 13.5px;
	color: var(--wb-ink);
	white-space: pre-wrap;
}

.wb-line-items {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--wb-border);
}

.wb-line-item-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	font-size: 13px;
}

.wb-line-item-desc {
	color: var(--wb-ink);
}

.wb-line-item-amount {
	color: #74808b;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

/* Filter chips on list pages (Service Jobs, Invoices) -- pure client-side
   show/hide against a server-computed data-filter-group, no reload. */
.wb-filter-chips {
	display: flex;
	gap: 8px;
	margin: 18px 0 4px;
	flex-wrap: wrap;
}

.wb-filter-chip {
	background: #ffffff;
	border: 1px solid var(--wb-border);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wb-ink);
	cursor: pointer;
}

.wb-filter-chip-active {
	background: var(--wb-ink);
	border-color: var(--wb-ink);
	color: #ffffff;
}

/* Form styling for the two customer-submitted-form pages (get-quote,
   maintenance-request) — scoped to .wb-portal so it never leaks into
   Desk or any other Bootstrap-using page on the site. */
.wb-portal label {
	font-size: 12px;
	font-weight: 600;
	color: #74808b;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wb-portal .form-control {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 8px 12px;
	/* >=16px stops iOS Safari auto-zooming the page on input focus — a
	   smaller inherited size here would otherwise trigger that on every
	   phone visit. */
	font-size: 16px;
}

.wb-portal .form-control:focus {
	border-color: var(--wb-ink);
	box-shadow: 0 0 0 3px rgba(42, 88, 80, 0.16);
	outline: none;
}

.wb-portal .btn-primary {
	background: var(--wb-ink);
	border-color: var(--wb-ink);
	border-radius: 8px;
	padding: 8px 20px;
	font-weight: 600;
}

.wb-portal .btn-primary:hover,
.wb-portal .btn-primary:focus {
	background: var(--wb-ink-dark);
	border-color: var(--wb-ink-dark);
}

/* --- Page background (2026-08) ---------------------------------------------
   The whole viewport, not just individual cards -- a plain white page made
   every white card blend into it with no depth. A subtle sage tint behind
   white cards gives the portal a warmer, less flat feel without resorting
   to gradients. */
body:has(.wb-portal) {
	background: var(--wb-sage-tint);
}

/* Same precedent as the login page (login_theme.css's
   body[data-path="login"] .web-footer rule) -- the stock "Powered by
   ERPNext" footer doesn't belong on a branded customer portal page. */
body:has(.wb-portal) .web-footer {
	display: none;
}

/* --- Portal sidebar (2026-08-31) -------------------------------------------
   Replaces the old top_bar_items link row (see git history if you're
   looking for it) -- a flat row inside the navbar had nowhere to put
   grouping, and three real destinations (Get a Quote, Request Maintenance,
   the AI Assistant) never fit in it at all, reachable only from
   dashboard-only buttons. Every wb-portal page now wraps its content in
   .wb-portal-shell + includes templates/includes/portal_sidebar.html,
   with context.sidebar_sections (rbac.py's get_portal_sidebar_sections())
   and context.active_nav set in that page's own get_context(). */

.wb-portal-shell {
	/* Deliberately full-width, unlike a Bootstrap .container -- the
	   sidebar is meant to sit flush against the real left edge of the
	   viewport (like Desk's own nav rail), not centered as part of a
	   max-width block. Confirmed live: max-width + margin:0 auto here
	   centered the sidebar+content pair as one unit, leaving a dead
	   gutter to the left of the sidebar on any screen wider than 1280px.
	   Each page's own .container.wb-portal (inside .wb-portal-main)
	   already centers the readable content within the space next to the
	   sidebar -- this rule doesn't need to duplicate that. */
	display: flex;
	align-items: flex-start;
}

.wb-portal-main {
	flex: 1;
	min-width: 0;
}

.wb-sidebar {
	width: 244px;
	flex: none;
	background: var(--wb-ink-dark);
	/* Full 100vh, not offset for a top navbar -- these pages now suppress
	   the site's standard navbar entirely (see {% block navbar %} in each
	   page's own template), so there's nothing above the sidebar to
	   subtract for any more. */
	min-height: 100vh;
	padding: 20px 12px;
	position: sticky;
	top: 0;
}

.wb-sidebar-brand {
	padding: 4px 10px 20px;
}

.wb-sidebar-brand img {
	max-width: 100%;
	height: auto;
	max-height: 34px;
}

.wb-sidebar-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
	margin: 16px 10px 6px;
}

.wb-sidebar-item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 10px;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.wb-sidebar-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
}

.wb-sidebar-item-active {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.wb-sidebar-item i {
	font-size: 17px;
	flex: none;
	opacity: 0.9;
}

.wb-sidebar-user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 10px 4px;
	margin-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wb-sidebar-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--wb-sage);
	color: var(--wb-ink-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 12px;
	flex: none;
}

.wb-sidebar-user-name {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wb-sidebar-toggle {
	display: none;
}

.wb-sidebar-scrim {
	display: none;
}

/* Below this width there isn't room for a 244px sidebar next to real
   content -- collapses to an off-canvas drawer instead, same interaction
   pattern as the Desk nav rail (desk_theme.js/.css). */
@media (max-width: 900px) {
	.wb-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 1040;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
	}

	body.wb-sidebar-open .wb-sidebar {
		transform: translateX(0);
	}

	.wb-sidebar-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		min-height: 0;
		border-radius: 8px;
		border: 1px solid var(--wb-border);
		background: #fff;
		margin: 0 0 16px;
	}

	.wb-sidebar-toggle i {
		font-size: 18px;
		color: var(--wb-ink);
	}

	body.wb-sidebar-open .wb-sidebar-scrim {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(28, 74, 66, 0.35);
		z-index: 1030;
	}
}

/* --- Site branding on portal pages ---------------------------------------
   The stock website navbar (frappe/templates/includes/navbar/navbar.html)
   renders Website Settings' banner_image with no size constraint of its
   own — logo.png is a wide 1024x243 lockup meant to sit at a deliberate,
   noticeable size, not shrink to whatever a generic nav bar happens to
   default to. Scoped to .wb-portal pages only; the login page hides this
   navbar entirely and sizes its own copy separately in login_theme.css. */
body:has(.wb-portal) .navbar-brand img {
	max-height: 52px;
	width: auto;
}

/* --- Bigger top bar (2026-08-03) -------------------------------------------
   User's own ask: the desktop navbar felt small relative to the rest of the
   page. Bootstrap's default navbar sizes itself purely from its content's
   own line-height with no deliberate vertical padding, so the whole strip
   read as thin no matter how big the logo/avatar inside it were on their
   own — needs real padding on the bar itself, not just bigger contents. */
body:has(.wb-portal) .navbar {
	padding-top: 18px;
	padding-bottom: 18px;
}

body:has(.wb-portal) .navbar-brand img {
	max-height: 68px;
}

body:has(.wb-portal) .navbar .avatar,
body:has(.wb-portal) .navbar .user-image-wrapper .avatar {
	width: 40px;
	height: 40px;
	line-height: 40px;
	font-size: 16px;
}

/* --- Mobile ---------------------------------------------------------------
   No breakpoints existed anywhere in this file before — auto-fit grids
   happen to collapse reasonably on their own, but spacing, touch targets,
   and heading sizes were all still tuned for desktop only. */
@media (max-width: 640px) {
	.wb-portal {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	/* The bigger desktop navbar padding/avatar above would otherwise make
	   an already-tight mobile header even more cramped alongside the
	   hamburger toggle — keep mobile at the original, smaller sizing. */
	body:has(.wb-portal) .navbar {
		padding-top: 8px;
		padding-bottom: 8px;
	}

	body:has(.wb-portal) .navbar .avatar,
	body:has(.wb-portal) .navbar .user-image-wrapper .avatar {
		width: 30px;
		height: 30px;
		line-height: 30px;
		font-size: 13px;
	}

	.wb-portal h2 {
		font-size: 22px;
	}

	.wb-card {
		padding: 14px;
	}

	.wb-stat-row,
	.wb-quick-links {
		grid-template-columns: 1fr;
	}

	.wb-stat-value {
		font-size: 24px;
	}

	.wb-lease-meta {
		flex-wrap: wrap;
		gap: 16px;
	}

	/* Comfortable tap target height (44px is the standard minimum) on
	   every link/button a customer actually taps on a phone. */
	.wb-quick-link,
	.wb-portal .btn-primary {
		min-height: 44px;
	}

	body:has(.wb-portal) .navbar-brand img {
		max-height: 40px;
	}

	.wb-dashboard-grid {
		grid-template-columns: 1fr;
	}

	.wb-next-up {
		flex-wrap: wrap;
	}

	.wb-next-up .btn {
		width: 100%;
	}

	.wb-prop-card {
		flex-basis: 200px;
	}
}

/* --- Dedicated full-page chat route (/assistant) ---------------------------
   Shown only for the brief window before the ChangAI widget itself mounts
   inside it and covers this with its own full-page panel (see
   changai_brand.js's IS_ASSISTANT_PAGE handling) — kept minimal on purpose,
   this is a loading state, not a real page. */
.wb-assistant-page {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wb-sage-tint);
	color: var(--wb-ink);
	font-size: 15px;
}

/* --- Photo gallery + lightbox (2026-09-02) ---------------------------------
   Photos previously rendered as the same plain filename/date row as every
   other document type, with no way to browse between them -- this grid +
   lightbox pair (wired up by public/js/wb_photo_gallery.js) gives photos
   their own visual treatment, reusing the thumbnail URL already proven to
   work as an <img>/background-image source for the property card photo
   (stream_document_file?mode=view returns raw image bytes, not an HTML
   page, so it doubles as both thumbnail and full-size lightbox image). */
.wb-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin-top: 10px;
}

.wb-photo-thumb {
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: var(--wb-sage-tint);
	cursor: pointer;
	border: 1px solid var(--wb-border);
	transition: transform 0.15s ease;
}

.wb-photo-thumb:hover {
	transform: scale(1.03);
}

.wb-photo-group-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.wb-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(10, 20, 18, 0.92);
	z-index: 2000;
	align-items: center;
	justify-content: center;
}

.wb-lightbox.wb-lightbox-open {
	display: flex;
}

.wb-lightbox-img {
	max-width: 88vw;
	max-height: 82vh;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.wb-lightbox-close,
.wb-lightbox-prev,
.wb-lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wb-lightbox-close:hover,
.wb-lightbox-prev:hover,
.wb-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.22);
}

.wb-lightbox-close {
	top: 20px;
	right: 20px;
}

.wb-lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.wb-lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.wb-lightbox-caption {
	position: absolute;
	bottom: 24px;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}

.wb-lightbox-download {
	position: absolute;
	top: 20px;
	left: 20px;
}
