:root {
	color-scheme: light dark;
	/* Fonts */
	--font: "Inter", "Noto Color Emoji", sans-serif;
	--emoji: "Noto Color Emoji", sans-serif;
	--regular: 400;
	--demisemibold: 500;
	--semibold: 600;
	--bold: 700;
	--base-size: 14px;
	--default-font-size: var(--base-size);
	--button-font-size: var(--base-size);
	--small-text: calc(var(--default-font-size) * 0.85);
	--large-text: calc(var(--default-font-size) * 1.15);
	--header-text: calc(var(--default-font-size) * 1.7);
	/* Common margin sizes */
	--pinstripe: calc(var(--default-font-size) * 0.175);
	--trim: calc(var(--default-font-size) * 0.35);
	--gap: calc(var(--default-font-size) * 0.7);
	--trench: calc(var(--default-font-size) * 1.5);

	/* Transition timing */
	--pane-transition: 0.25s;
	--fast-transition: 0.09s;
	--med-transition: 0.25s;
	--slow-transition: 0.75s;
	/* RAW COLORS */
	--white: #ffffff;
	--gray98: #fbfbfb;
	--gray96: #f6f5f4;
	--gray91: #e8e8e8;
	--gray86: #dddcdb;
	--gray73: #babbbc;
	--gray53: #868686;
	--gray36: #5d5d5d;
	--gray28: #4a4a43;
	--gray20: #333333;
	--gray16: #282828;
	--gray12: #201e21;
	--gray86a20: #dddcdb33;
	--gray20a20: #33333333;
	--brand: #004275;
	--brand-primary: #6000d3;
	--brand-primary-80percent: #6000d3cc;
	--brand-primary-50percent: #6000d380;
	--brand-primary-20percent: #6000d333;
	--brand-primary-10percent: #6000d320;
	--brand-primary-background: #6a20e9;
	--dark-secondary: #3f138b;
	--brand-primary-highlight: #6f19d7;
	--light-secondary: #be9df5;
	--light-secondary-background: #d8cfe7;
	--light-secondary-highlight: #e5d7ff;
	--light-secondary-10percent: #c9bbdf20;
	--dark-tertiary: #1f2456;
	--light-tertiary: #6bc6c4;
	--light-tertiary-50percent: #6bc6c480;
	--light-tertiary-20percent: #6bc6c433;
	--light-tertiary-10percent: #6bc6c420;
	--light-tertiary-half-white: #b7e2e1;
	--brand-highlight: #3fee7f;
	--teal: #407675;
	--cyan-blue: #6bb1c9;
	--danger-color: light-dark(#ff453a, #ff7575);
	--danger-color-80percent: #ff453acc;
	--danger-color-50percent: #ff453a80;
	--alert-color: #f7ce46;
	--masking-green: #498b35;
	--inactive-tab: #6c757d;
	--icon-yellow: #f7ce46;

	--tag-success: #348f29;
	--tag-success-bkg: #348f291a;
	--tag-error: #ff453a;
	--tag-error-bkg: #ff453a1a;
	--tag-pending: #6000d3;
	--tag-pending-bkg: #6000d31a;
	--tag-quality: light-dark(#aed4fa, #3c94d8);
	--tag-type: light-dark(#d089e9, #ce43a0);
	--tag-misc: light-dark(#6000d3, #6bc6c4);

	/* These are the possible background colors for the user icon */
	--user-color-1: #e20093;
	--user-color-2: #109fb8;
	--user-color-3: #ec6918;
	--user-color-4: #348f29;
	--user-color-5: #3e349d;

	/* ADAPTIVE COLORS */
	/* General interface colors */
	--main-text-color: light-dark(var(--gray12), var(--gray91));
	--secondary-text-color: light-dark(var(--gray36), var(--gray86));
	--main-bkg-color: light-dark(var(--gray96), var(--gray20));
	--alt-bkg-color: light-dark(var(--white), var(--gray12));
	--tertiary-bkg-color: light-dark(var(--gray91), var(--gray28));
	--detail-bkg-color: light-dark(var(--gray98), var(--gray16));
	--modal-detail-bkg-color: light-dark(var(--white), var(--gray16));
	--stroke: light-dark(var(--gray16), var(--gray91));
	--highlight: light-dark(var(--brand-primary), var(--light-secondary));
	--pop: light-dark(var(--brand-primary), var(--light-tertiary));
	--pop-secondary: light-dark(var(--light-secondary), var(--light-tertiary));
	--light-pop: light-dark(var(--brand-primary-10percent), var(--light-tertiary-10percent));
	--focus: light-dark(var(--brand-primary-50percent), var(--light-tertiary-50percent));
	--attention: #fc24;
	--lighter-border: light-dark(var(--gray86), var(--gray20));
	--light-border: light-dark(var(--gray73), var(--gray36));
	--mid-border: var(--gray53);
	--dark-border: light-dark(var(--gray36), var(--gray73));
	--strong-border: light-dark(var(--gray20), var(--gray86));
	--rule-color: light-dark(var(--gray86), var(--gray36));
	--section-border: light-dark(var(--gray91), var(--gray20));
	--section-border-grey-gradient: light-dark(var(--gray86), var(--gray12));
	--unselected-border: light-dark(#201e2150, #e8e8e850);
	--input-border: var(--light-border);
	--notice-color: light-dark(#fbebb5, #62521c);
	--purple-label-text: light-dark(var(--dark-secondary), var(--main-text-color));
	--teal-label-text: light-dark(var(--teal), var(--main-text-color));
	--trial-bar-bkg: #b1dddc;

	/* Input fields */
	--input-field: light-dark(var(--white), var(--gray12));
	--input-text: light-dark(var(--gray12), var(--gray91));
	--checkbox-enable: light-dark(var(--light-tertiary), var(--teal));

	/* Buttons */
	--main-button-bkg: light-dark(var(--alt-bkg-color), var(--gray36));
	--main-button-bkg-hover: light-dark(var(--gray91), var(--gray12));
	--main-button-text: light-dark(var(--gray36), var(--gray91));
	--alt-button-bkg: light-dark(var(--main-bkg-color), var(--gray36));
	--alt-button-bkg-hover: light-dark(var(--gray96), var(--gray20));
	--alt-button-text: light-dark(var(--gray36), var(--gray91));
	--disabled-button-bkg: light-dark(var(--gray86), var(--gray16));
	--disabled-button-text: light-dark(var(--gray73), var(--gray36));
	--attention-button-bkg: var(--brand-primary);
	--attention-button-bkg-hover: var(--brand-primary-highlight);
	--attention-button-text: var(--white);
	--brand-button-bkg: light-dark(var(--white), var(--gray36));
	--brand-button-bkg-hover: light-dark(var(--gray91), var(--gray20));
	--brand-button-text: light-dark(var(--gray36), var(--gray91));
	--brand-button-outline: light-dark(var(--gray73), var(--gray53));
	--danger-button-bkg: var(--danger-color);
	--danger-button-bkg-hover: var(--danger-color-80percent);
	--danger-button-text: light-dark(var(--white), var(--gray20));
	--button-background-selected: var(--brand-primary-10percent);
	--button-edge: #00000022;
	--transparent-button-bkg: light-dark(#fffa, #000a);
	--hover-button-bkg: light-dark(#fffd, #000d);
	--contrast-button-color: light-dark(var(--brand-primary), var(--white));

	/* Tooltips and modals */
	--tooltip-background: light-dark(var(--gray36), var(--gray73));
	--tooltip-text: light-dark(var(--white), var(--gray12));
	--modal-background: light-dark(var(--white), var(--gray20));
	--modal-hover: light-dark(var(--gray96), var(--alt-bkg-color));
	--modal-text: var(--gray12);
	--blow-up-text: light-dark(#000000b0, #ffffffb0);
	--blow-up-background: light-dark(#ffffff60, #00000060);
	--brand-dialog: light-dark(var(--brand-primary), var(--dark-secondary));
	--brand-dialog-spot: light-dark(var(--light-secondary), var(--brand-primary));
	--adaptive-highlight: light-dark(var(--brand-highlight), var(--brand-highlight));

	/* Loading spinner */
	--loading-spinner-off: #88888828;
	--loading-spinner-on: light-dark(var(--brand-primary), var(--light-secondary));
	--loading-spinner-transparent-on: light-dark(#ffffff80, #201e2180);

	/* Large icons */
	--icon-outline: light-dark(var(--gray86), #5d5d5d);
	--icon-highlight: light-dark(#e5d7ff, #6000d3);
	--icon-highlight-alt: light-dark(#e5d7ff, var(--light-secondary));
	--icon-brand: light-dark(var(--brand-primary), var(--light-secondary));
	--icon-shade: light-dark(var(--light-secondary), var(--brand-primary));
	--icon-spot: light-dark(#f4eeff, var(--dark-secondary));
	--icon-circle: light-dark(#3f138b1a, #ffffff1a);
}

@media (max-width: 750px) {
	:root {
		--base-size: calc(14px * 0.75);
	}
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
	margin: 0;
}

body {
	background-color: var(--main-bkg-color);
	color: var(--main-text-color);
	font-family: var(--font);
	font-weight: var(--regular);
	font-size: var(--default-font-size);
	line-height: 1.5em;
}

body.spoke {
	background-color: var(--alt-bkg-color);
	--default-font-size: 16px;
	--button-font-size: 18px;
	touch-action: none;
}

a {
	color: var(--pop);
}

button,
input {
	font: inherit;
}

button {
	cursor: pointer;
	background: var(--attention-button-bkg);
	color: var(--attention-button-text);
	border: none;
	border-radius: 6px;
	padding: 0.6rem 1rem;
}

button:hover {
	background: var(--attention-button-bkg-hover);
}

button:disabled,
button:disabled:hover {
	cursor: default;
	background: var(--disabled-button-bkg);
	color: var(--disabled-button-text);
}

input {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--input-border);
	border-radius: 6px;
	background: var(--input-field);
	color: var(--input-text);
}

/* Floating label: label sits inside the field and floats to the top edge
   once the field has focus or a value, instead of vanishing like a
   placeholder. CSS-only via :placeholder-shown (input needs a non-empty
   placeholder, e.g. a single space, for that pseudo-class to apply), so
   the label must immediately follow the input in markup. */

.field {
	position: relative;
}

.field input {
	padding: 1.5rem 0.9rem 0.5rem;
}

.field label {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--secondary-text-color);
	font-size: var(--default-font-size);
	pointer-events: none;
	transition:
		top var(--fast-transition) ease,
		font-size var(--fast-transition) ease,
		transform var(--fast-transition) ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
	top: 0.6rem;
	transform: translateY(0);
	font-size: var(--small-text);
}

.shell {
	max-width: 720px;
	margin: 0 auto;
	padding: 2rem 1.25rem;
}

.card {
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 10px;
	padding: 1.5rem;
}

.stack {
	display: grid;
	gap: 0.85rem;
}

.muted {
	color: var(--secondary-text-color);
}

.error {
	color: var(--danger-color);
}

/* Page chrome: header/footer shared by auth and app pages */

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}
/* Portal header: dealer branding on the left, tagline or user chip on the right */

.store-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 96px;
	padding: 0.75rem 3rem;
	background: var(--alt-bkg-color);
	border-bottom: 1px solid var(--section-border);
}

.store-header-brand {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	min-width: 0;
}

.store-logo {
	display: block;
	height: 56px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

.store-wordmark {
	font-weight: var(--bold);
	font-size: 1.25rem;
}

.store-header-divider {
	align-self: stretch;
	width: 1px;
	margin: 0.5rem 0;
	background: var(--rule-color);
}

/* The caption gives way first when the header is tight (portrait tablets), so it never runs under the controls. */
.store-header-title {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 1.25rem;
	color: var(--secondary-text-color);
	white-space: nowrap;
}

.store-header-right {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 1.0625rem;
	color: var(--secondary-text-color);
}

.user-chip {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.375rem 1.25rem 0.375rem 0.375rem;
	border: 1px solid var(--lighter-border);
	border-radius: 999px;
	color: var(--main-text-color);
	font-size: 1.125rem;
	font-weight: var(--demisemibold);
}

.user-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: light-dark(var(--gray16), var(--gray86));
	color: light-dark(var(--white), var(--gray12));
	font-size: 1.0625rem;
	font-weight: var(--semibold);
}

.text-button,
.text-button:hover,
.text-button:disabled,
.text-button:disabled:hover {
	background: none;
	padding: 0.25rem;
	color: var(--pop);
	font-weight: var(--demisemibold);
	white-space: nowrap;
}

.text-button:hover {
	text-decoration: underline;
}

.btn-secondary {
	background: var(--alt-button-bkg);
	color: var(--alt-button-text);
	border-radius: 999px;
	padding: 0.55rem 1.25rem;
}

.btn-secondary:hover {
	background: var(--alt-button-bkg-hover);
}

/* Workspace (signed-in app list) */

.workspace {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 3.5rem 1.5rem 2rem;
	line-height: 1.5;
}

.workspace-welcome {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	color: var(--secondary-text-color);
}

.workspace h1 {
	margin: 0;
	font-size: 2.5rem;
	line-height: 1.2;
}

.workspace-subtitle {
	margin: 0.25rem 0 0;
	font-size: 1.375rem;
	color: var(--secondary-text-color);
}

.workspace h2 {
	margin: 2.25rem 0 1rem;
	font-size: 1.5rem;
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 0.75rem;
}

.service-card {
	display: flex;
	flex-direction: column;
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 16px;
	padding: 1.5rem;
}

.service-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

/* Product photos have white backgrounds; a fixed light swatch + multiply blends them in both themes. */
.service-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 168px;
	height: 104px;
	flex-shrink: 0;
	border-radius: 10px;
	background: #f2f1ef;
	overflow: hidden;
}

.service-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.service-image-placeholder {
	color: var(--gray53);
	font-weight: var(--bold);
	font-size: 2rem;
}

.service-brand {
	display: block;
	max-width: 130px;
	max-height: 32px;
	margin-top: 0.75rem;
	object-fit: contain;
}

.service-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 12px;
	background: var(--icon-spot);
	color: var(--icon-brand);
}

.service-icon svg {
	width: 40px;
	height: 40px;
}

.coming-soon {
	padding: 0.25rem 0.9rem;
	border: 1px solid var(--lighter-border);
	border-radius: 999px;
	background: var(--main-bkg-color);
	color: var(--secondary-text-color);
	font-size: 0.8125rem;
	white-space: nowrap;
}

.service-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.service-desc {
	margin: 0 0 1.25rem;
	font-size: 1.125rem;
	color: var(--secondary-text-color);
}

.service-card .cta {
	margin-top: auto;
}

.service-card > .coming-soon {
	align-self: flex-start;
	margin-top: auto;
}

/* Manage team (/users, admin only) */

.team {
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	padding: 2rem 1.5rem 2rem;
	line-height: 1.5;
}

.team-back {
	gap: 0.375rem;
	color: var(--pop);
	font-size: var(--default-font-size);
	font-weight: var(--demisemibold);
}

.team-back svg {
	width: 14px;
	height: 14px;
}

.team-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	margin: 0.75rem 0 1.75rem;
}

.team h1 {
	margin: 0;
	font-size: 2.5rem;
	line-height: 1.2;
}

.team-subtitle {
	margin: 0.25rem 0 0;
	font-size: 1.25rem;
	color: var(--secondary-text-color);
}

button.team-add {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex: none;
	justify-content: center;
	min-width: 12rem;
	margin-top: 0.25rem;
	padding: 0.875rem 2rem;
	border-radius: 8px;
	font-size: var(--large-text);
	font-weight: var(--semibold);
}

.team-add svg {
	width: 16px;
	height: 16px;
}

.team-card {
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 12px;
}

.team-seats {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1.5rem;
	padding: 1.25rem 1.5rem;
}

.team-seats-main,
.team-seats-side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.team-seats-side {
	min-width: 16rem;
}

.team-seats-label {
	color: var(--secondary-text-color);
	font-weight: var(--semibold);
}

.team-seats-label + .team-summary-count,
.team-seats-price {
	margin: 0.375rem 0 0.25rem;
}

.team-seats-price {
	font-size: 1.5rem;
	font-weight: var(--bold);
}

.team-seats-main button.team-arrow-link {
	margin-top: 0.75rem;
	font-weight: var(--semibold);
}

/* :hover repeated so .text-button:hover's padding (higher specificity) doesn't shift the link on hover. */
button.team-arrow-link,
button.team-arrow-link:hover {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0;
}

.team-arrow-link svg {
	width: 18px;
	height: 18px;
}

/* Dismissible message under the page heading (invitation sent, seat added, errors). */
.team-banner {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.25rem;
	padding: 0.875rem 1rem 0.875rem 1.25rem;
	border: 1px solid;
	border-radius: 12px;
}

.team-banner.tone-success {
	background: var(--tag-success-bkg);
	border-color: light-dark(#348f2933, #348f2966);
}

.team-banner.tone-success .team-banner-icon {
	color: light-dark(var(--tag-success), #7fd174);
}

.team-banner.tone-warning {
	background: light-dark(#fdf1dc, #4a3515);
	border-color: light-dark(#f2d19b, #7a5a25);
}

.team-banner.tone-warning .team-banner-icon {
	color: light-dark(#b26b00, #f3b95f);
}

.team-banner.tone-error {
	background: var(--tag-error-bkg);
	border-color: light-dark(#ff453a40, #ff453a66);
}

.team-banner.tone-error .team-banner-icon {
	color: var(--danger-color);
}

.team-banner.tone-info {
	background: var(--tag-pending-bkg);
	border-color: light-dark(#6000d326, #6000d366);
}

.team-banner.tone-info .team-banner-icon {
	color: var(--pop);
}

.team-banner-icon svg {
	display: block;
	width: 28px;
	height: 28px;
}

.team-banner-body {
	flex: 1;
	min-width: 0;
}

.team-banner-title {
	font-weight: var(--semibold);
}

.team-banner-text {
	color: var(--secondary-text-color);
}

button.team-banner-action {
	text-decoration: underline;
}

button.icon-button,
button.icon-button:hover {
	display: flex;
	flex: none;
	padding: 0.375rem;
	border-radius: 6px;
	background: none;
	color: var(--secondary-text-color);
}

button.icon-button:hover {
	background: #8881;
	color: var(--main-text-color);
}

.icon-button svg {
	width: 20px;
	height: 20px;
}

.team-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3rem 1.5rem;
	color: var(--secondary-text-color);
}

/* The shared spinner takes its accent from the Stanton catalog; outside it, use the portal's. */
.team-loading .spinner {
	border-top-color: var(--loading-spinner-on);
}

.team-summary-label {
	font-weight: var(--semibold);
	font-size: var(--large-text);
}

.team-summary-count {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.125rem 0 0.25rem;
	font-size: 1.75rem;
	font-weight: var(--bold);
}

.team-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--lighter-border);
}

button.team-tab,
button.team-tab:hover {
	margin-bottom: -1px;
	padding: 0.625rem 1.25rem;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: none;
	color: var(--secondary-text-color);
	font-size: var(--large-text);
	font-weight: var(--demisemibold);
}

button.team-tab:hover {
	color: var(--main-text-color);
}

button.team-tab[aria-selected="true"] {
	border-bottom-color: var(--pop);
	color: var(--pop);
}

.team-section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	margin: 2rem 0 0.75rem;
}

.team h2 {
	margin: 0;
	font-size: 1.375rem;
}

.team-section-heading p {
	margin: 0.125rem 0 0;
}

.team-stores-heading {
	margin-top: 0;
	align-items: center;
}

.team-select {
	position: relative;
	display: block;
}

.team-select select {
	width: 100%;
	padding: 0.6rem 2.5rem 0.6rem 0.9rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--input-field);
	color: var(--main-text-color);
	font: inherit;
	appearance: none;
	cursor: pointer;
}

.team-select svg {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--secondary-text-color);
	pointer-events: none;
}

.team-store-filter {
	min-width: 180px;
}

.search-field.team-store-search {
	width: min(320px, 100%);
	margin-top: 0;
}

.team-store-search input {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	font-size: var(--default-font-size);
}

.team-store {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.team-store-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--tag-pending-bkg);
	color: var(--pop);
}

.team-store-icon svg {
	width: 22px;
	height: 22px;
}

.team-store-name,
.team-store-count {
	font-weight: var(--semibold);
}

.team-store-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
}

.team-store-actions .text-button {
	text-decoration: underline;
}

.team-table td.team-empty {
	padding: 2rem 1.5rem;
	text-align: center;
}

.team-empty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2.5rem 1.5rem;
	text-align: center;
}

.team-empty-card h3 {
	margin: 0.875rem 0 0.25rem;
	font-size: var(--large-text);
}

.team-empty-card p {
	max-width: 420px;
	margin: 0;
}

.team-table {
	width: 100%;
	border-collapse: collapse;
}

.team-table th,
.team-table td {
	text-align: left;
	vertical-align: middle;
	padding: 0.875rem 1.5rem;
	border-bottom: 1px solid var(--lighter-border);
}

.team-table th {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
}

.team-table tr:last-child td {
	border-bottom: none;
}

.team-table tr.is-disabled .team-account {
	opacity: 0.6;
}

.team-table .team-actions {
	width: 1%;
	text-align: right;
	white-space: nowrap;
}

.team-account {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	min-width: 0;
}

.team-account-text {
	min-width: 0;
}

.team-account-name {
	font-weight: var(--semibold);
	overflow-wrap: anywhere;
}

.team-avatar {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: var(--small-text);
	font-weight: var(--semibold);
}

.team-avatar.tone-0 {
	background: light-dark(#dde8fb, #25375a);
	color: light-dark(#23427a, #c9dafa);
}

.team-avatar.tone-1 {
	background: light-dark(#ece2fd, #3b2566);
	color: light-dark(#4b1c9c, #ddccfb);
}

.team-avatar.tone-2 {
	background: light-dark(#fde6dc, #5a3325);
	color: light-dark(#8a3a1b, #f8d3c3);
}

.team-avatar.tone-3 {
	background: light-dark(#dcf3ec, #1f4a3e);
	color: light-dark(#1d6350, #c3ecdf);
}

.pill {
	display: inline-block;
	padding: 0.125rem 0.75rem;
	border-radius: 999px;
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
	white-space: nowrap;
}

.pill-success {
	background: var(--tag-success-bkg);
	color: light-dark(var(--tag-success), #7fd174);
}

.pill-admin {
	background: var(--tag-pending-bkg);
	color: var(--pop);
}

.pill-muted {
	background: var(--main-bkg-color);
	color: var(--secondary-text-color);
}

.pill-pending {
	background: light-dark(#fdebd3, #4a3515);
	color: light-dark(#a05a00, #f3b95f);
}

.pill-danger {
	background: var(--tag-error-bkg);
	color: var(--danger-color);
}

.team-summary-count .pill {
	font-size: var(--small-text);
}

.team-row-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}

button.team-resend {
	text-decoration: underline;
}

.team-you {
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

/* inline-flex + middle keeps the ⋯ button centered in its row instead of sitting on the text baseline. */
.row-actions {
	position: relative;
	display: inline-flex;
	vertical-align: middle;
}

button.row-menu-button,
button.row-menu-button:hover,
button.row-menu-button:disabled {
	display: flex;
	padding: 0.375rem;
	border-radius: 6px;
	background: none;
	color: var(--main-text-color);
}

button.row-menu-button:hover {
	background: var(--main-bkg-color);
}

.row-menu-button svg {
	width: 20px;
	height: 20px;
}

.row-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 0.25rem);
	right: 0;
	min-width: 180px;
	padding: 0.375rem;
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 10px;
	box-shadow: 0 8px 24px #0000001f;
	text-align: left;
}

.row-menu button {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	white-space: nowrap;
	text-align: left;
	background: none;
	color: var(--main-text-color);
}

.row-menu button:hover {
	background: var(--main-bkg-color);
}

.row-menu button.danger {
	color: var(--danger-color);
}

.row-menu button svg {
	flex: none;
	width: 18px;
	height: 18px;
}

.row-menu button:disabled,
.row-menu button:disabled:hover {
	align-items: flex-start;
	background: none;
	color: var(--secondary-text-color);
}

.row-menu-text {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.row-menu-hint {
	font-size: var(--small-text);
	white-space: normal;
}

.team-footnote {
	margin: 0.75rem 0 0;
	font-size: var(--small-text);
}

.team-dialog {
	width: min(480px, calc(100vw - 2rem));
	padding: 1.75rem 2rem 2rem;
	border: 1px solid var(--lighter-border);
	border-radius: 14px;
	background: var(--alt-bkg-color);
	color: var(--main-text-color);
	box-shadow: 0 16px 48px #00000033;
}

.team-dialog::backdrop {
	background: #00000059;
}

/* Invite a team: wider dialog, the pasted list and what was found in it */
.team-dialog.team-dialog-wide {
	width: min(640px, calc(100vw - 2rem));
}

.team-dialog {
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
}

.team-segmented.team-mode {
	margin: 0 0 1.25rem;
}

.team-mode label {
	flex: 1;
	text-align: center;
}

textarea.team-list {
	display: block;
	width: 100%;
	min-height: 9rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--light-border);
	border-radius: 8px;
	background: var(--input-field);
	color: var(--input-text);
	font: inherit;
	line-height: 1.5;
	resize: vertical;
}

textarea.team-list:focus {
	outline: 2px solid var(--focus);
	outline-offset: 1px;
}

.team-dialog .form-field:has(textarea.team-list) {
	margin-bottom: 0.75rem;
}

.team-list-check {
	margin: 0 0 0.75rem;
}

.team-list-problems {
	max-height: 10rem;
	margin: 0 0 1.25rem;
	padding: 0.5rem 0.875rem;
	overflow-y: auto;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	list-style: none;
	font-size: var(--small-text);
}

.team-list-problems li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	padding: 0.25rem 0;
}

.team-list-line {
	flex: none;
	width: 4rem;
	color: var(--secondary-text-color);
}

.team-list-text {
	font-weight: var(--demisemibold);
	overflow-wrap: anywhere;
}

.team-list-reason {
	color: var(--danger-color);
}

.team-results.team-list-problems {
	max-height: 14rem;
}

.team-shared-label {
	margin: 0.5rem 0 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--lighter-border);
	color: var(--secondary-text-color);
	font-weight: var(--semibold);
}

.form-helper.team-field-problem {
	color: var(--danger-color);
}

/* Seats bought from Invite user: the server's price and the consent checkbox */
.team-buy {
	margin: -0.25rem 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
}

.team-buy .team-price-detail {
	margin: 0.25rem 0 0.75rem;
}

.team-buy .checkbox-field.team-approve {
	margin-bottom: 0;
}

.team-dialog p.team-buy-notice {
	margin: 0 0 0.5rem;
	font-weight: var(--semibold);
}

.team-buy-error {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	color: var(--danger-color);
}

.team-buy-error button.text-button {
	flex: none;
	font-weight: var(--semibold);
}

.team-seat-alert.team-buy-payment {
	margin: 0;
}

/* Manage seats: what each seat costs, then stopping paid seats from renewing */
.team-charges {
	margin: 0 0 0.5rem;
	padding: 0;
	list-style: none;
}

.team-charge-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--lighter-border);
}

.team-charge-row .muted {
	font-size: var(--small-text);
}

.team-charge-amount {
	flex: none;
	text-align: right;
}

.team-charges-total {
	margin-bottom: 1.5rem;
}

.team-stop {
	padding-top: 1.25rem;
	border-top: 1px solid var(--lighter-border);
}

.team-stop h3 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.team-dialog .team-stop p {
	margin-bottom: 1rem;
}

.team-dialog p.team-dialog-note.team-stop-note {
	margin-top: 0.5rem;
}

/* Buying seats and sending invitations */
.team-progress {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.5rem 0 1rem;
}

.team-progress progress {
	flex: 1;
	height: 0.625rem;
	accent-color: var(--pop);
}

.team-progress p {
	margin: 0;
}

button.team-retry {
	font-weight: var(--semibold);
}

.team-dialog-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.team-dialog-header h2 {
	flex: 1;
	margin: 0;
	font-size: 1.5rem;
}

.team-dialog-header .icon-button {
	align-self: flex-start;
}

.team-dialog-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--tag-pending-bkg);
	color: var(--pop);
}

.team-dialog-icon svg {
	width: 24px;
	height: 24px;
}

.team-dialog p {
	margin: 0 0 1.25rem;
}

.team-dialog .form-field {
	margin-bottom: 1.125rem;
}

.team-dialog .form-field input,
.team-dialog .team-select select {
	padding: 0.75rem 0.9rem;
	border-color: var(--light-border);
	font-size: 1rem;
}

.team-dialog .team-select select {
	padding-right: 2.5rem;
}

button.team-inline-add,
button.team-inline-add:hover {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.125rem 0;
}

.team-inline-add svg {
	width: 16px;
	height: 16px;
}

.team-dialog p.team-dialog-note {
	margin-top: -0.5rem;
	font-size: var(--small-text);
}

/* Quantity stepper (Manage seats) */

.team-stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.team-stepper-row label {
	font-size: var(--large-text);
	font-weight: var(--semibold);
}

.team-stepper {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
}

.team-stepper input {
	width: 3.25rem;
	padding: 0.5rem 0.25rem;
	border: none;
	background: transparent;
	text-align: center;
	font-size: var(--large-text);
	-moz-appearance: textfield;
	appearance: textfield;
}

.team-stepper input::-webkit-outer-spin-button,
.team-stepper input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

button.team-stepper-button,
button.team-stepper-button:hover,
button.team-stepper-button:disabled {
	display: flex;
	padding: 0.5rem;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--pop);
}

button.team-stepper-button:hover {
	background: var(--tag-pending-bkg);
}

button.team-stepper-button:disabled {
	color: var(--secondary-text-color);
	opacity: 0.5;
}

.team-stepper-button svg {
	width: 20px;
	height: 20px;
}

/* Seat availability in a dialog: green when a seat is free, amber (with Add seat) when none are. */
.team-seat-alert {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1rem;
	padding: 0.875rem 1rem;
	border-radius: 8px;
	background: var(--tag-success-bkg);
	color: light-dark(var(--tag-success), #7fd174);
}

.team-seat-alert.tone-warning {
	background: light-dark(#fdf1dc, #4a3515);
	color: light-dark(#8a5300, #f3b95f);
}

.team-seat-alert > div {
	flex: 1;
}

.team-seat-alert button.text-button {
	flex: none;
	font-weight: var(--semibold);
}

.team-price-detail {
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

/* Invitation sent: who was invited, and that it used a seat they already had. */
.team-invite-sent {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.5rem 0 1.25rem;
	padding: 1.25rem;
	border-radius: 10px;
	background: var(--tag-success-bkg);
}

.team-invite-sent-email {
	font-size: var(--large-text);
	font-weight: var(--semibold);
	overflow-wrap: anywhere;
}

.team-invite-sent-charge {
	color: light-dark(var(--tag-success), #7fd174);
	font-weight: var(--semibold);
}

.team-price-summary {
	margin: 0 0 1.25rem;
}

.team-price-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.375rem 0;
	color: var(--secondary-text-color);
}

.team-price-row.team-price-total {
	padding-bottom: 0.125rem;
	color: var(--main-text-color);
	font-weight: var(--bold);
}

.checkbox-field.team-approve {
	align-items: start;
	margin-bottom: 0.5rem;
}

.team-approve input {
	margin-top: 0.125rem;
}

/* Account type: label on the left, User | Admin segmented control on the right */
.team-role-choice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1rem;
}

#team-role-label,
.team-tiles-label {
	font-size: 1rem;
	font-weight: var(--demisemibold);
}

.team-segmented {
	display: flex;
	padding: 0.1875rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--detail-bkg-color);
}

.team-segmented label {
	position: relative;
	padding: 0.375rem 1.25rem;
	border-radius: 6px;
	color: var(--secondary-text-color);
	font-weight: var(--demisemibold);
	cursor: pointer;
}

/* The radio stays in the form (Invite user reads role from it) and keyboard-focusable, just invisible. */
.team-segmented input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: inherit;
}

.team-segmented label:has(input:checked) {
	background: var(--alt-bkg-color);
	color: var(--pop);
	box-shadow: 0 1px 3px #00000026;
}

.team-segmented label:has(input:focus-visible) {
	outline: 2px solid var(--focus);
}

.team-segmented label:has(input:disabled) {
	cursor: default;
	opacity: 0.6;
}

/* Invite user: the tile switches fold into one row that says how many are on. */
.team-tiles {
	margin: 0 0 1rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
}

.team-tiles-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
}

.team-tiles summary {
	cursor: pointer;
	list-style: none;
}

.team-tiles summary::-webkit-details-marker {
	display: none;
}

.team-tiles .team-tiles-label {
	flex: 1;
}

.team-tiles summary svg {
	width: 18px;
	height: 18px;
	color: var(--secondary-text-color);
	transition: transform var(--fast-transition);
}

.team-tiles[open] summary svg {
	transform: rotate(180deg);
}

.team-tiles .team-switches {
	margin: 0;
	padding: 0 1rem 0.25rem;
	border-top: 1px solid var(--lighter-border);
}

.team-tiles .team-switches legend {
	/* The summary row already names the section. */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

/* User properties: a switch per app the dealer has */

.team-switches {
	margin: 0 0 1rem;
	padding: 0;
	border: none;
}

.team-switches legend {
	margin-bottom: 0.25rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

.team-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--lighter-border);
	cursor: pointer;
}

.team-switch:last-of-type {
	border-bottom: none;
}

.team-switch input {
	position: relative;
	flex: none;
	width: 2.5rem;
	height: 1.5rem;
	margin: 0;
	/* The global input padding and border would push the thumb off-center. */
	padding: 0;
	border: none;
	border-radius: 999px;
	background: var(--light-border);
	cursor: pointer;
	transition: background var(--fast-transition);
	appearance: none;
}

.team-switch input::before {
	position: absolute;
	top: 50%;
	left: 0.1875rem;
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 50%;
	background: var(--white);
	box-shadow: 0 1px 2px #00000040;
	content: "";
	transform: translateY(-50%);
	transition: transform var(--fast-transition);
}

.team-switch input:checked {
	background: var(--brand-primary);
}

.team-switch input:checked::before {
	transform: translate(1rem, -50%);
}

.team-switch input:focus-visible {
	outline: 2px solid var(--pop);
	outline-offset: 2px;
}

.team-switch input:disabled {
	cursor: default;
	opacity: 0.5;
}

.team-switch:has(input:disabled) {
	cursor: default;
}

.team-dialog-actions {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--lighter-border);
}

.team-dialog-actions button {
	padding: 0.7rem 1.5rem;
	border-radius: 8px;
	font-weight: var(--semibold);
}

/* With no Cancel button, the submit button still sits on the right. */
button.team-dialog-submit:only-child {
	margin-left: auto;
}

button.team-dialog-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-width: 50%;
}

.team-dialog-submit svg {
	width: 18px;
	height: 18px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * Dashboard (/dashboard): the Workspace's width on laptops and tablets, then wider with larger type on big
 * PC screens and store TVs (a 4K TV at 200% scaling is 1920 CSS px wide). The type sizes are redefined here
 * because --small-text and --large-text are worked out where they're declared.
 */
.team.dashboard {
	max-width: 1180px;
}

@media (min-width: 1600px) {
	.team.dashboard {
		max-width: 1560px;
	}
}

@media (min-width: 1920px) {
	.team.dashboard {
		--default-font-size: 16px;
		--small-text: calc(var(--default-font-size) * 0.85);
		--large-text: calc(var(--default-font-size) * 1.15);
		font-size: var(--default-font-size);
	}

	.dashboard .activity-chart {
		grid-template-rows: 260px auto;
	}
}

@media (min-width: 2400px) {
	.team.dashboard {
		--default-font-size: 20px;
		max-width: 2200px;
	}

	.dashboard .activity-chart {
		grid-template-rows: 340px auto;
	}
}

@media (max-width: 750px) {
	.team h1 {
		font-size: 2rem;
	}

	.team-table th,
	.team-table td {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (max-width: 560px) {
	.team-heading {
		flex-direction: column;
	}

	.team-seats {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.team-seats-side {
		min-width: 0;
		padding-top: 1rem;
		border-top: 1px solid var(--lighter-border);
	}

	.team-table .team-added {
		display: none;
	}

	.team-table th,
	.team-table td {
		padding-left: 0.625rem;
		padding-right: 0.625rem;
	}

	.team-avatar {
		display: none;
	}
}

/* Dashboard (team-activity). Chart series use categorical slots 1-4, validated in this order
   for colorblind separation on these card surfaces; light slots 3-4 are under 3:1, so the chart has a table view. */

team-activity {
	--series-1: light-dark(#2a78d6, #3987e5);
	--series-2: light-dark(#eb6834, #d95926);
	--series-3: light-dark(#1baf7a, #199e70);
	--series-4: light-dark(#eda100, #c98500);
	--chart-grid: light-dark(#e1e0d9, #2c2c2a);
	--chart-baseline: light-dark(#c3c2b7, #383835);
	--delta-up: light-dark(#006300, #0ca30c);
	display: block;
}

.series-1 {
	background: var(--series-1);
}

.series-2 {
	background: var(--series-2);
}

.series-3 {
	background: var(--series-3);
}

.series-4 {
	background: var(--series-4);
}

.activity-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.activity-period {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--alt-bkg-color);
}

.activity-period button,
.activity-period button:hover {
	padding: 0.45rem 0.9rem;
	border-radius: 6px;
	background: none;
	color: var(--secondary-text-color);
	font-weight: var(--demisemibold);
}

.activity-period button:hover {
	color: var(--main-text-color);
}

.activity-period button[aria-pressed="true"] {
	background: var(--tag-pending-bkg);
	color: var(--pop);
}

.activity-select {
	min-width: 180px;
}

.spinner.activity-refreshing {
	width: 18px;
	height: 18px;
	border-top-color: var(--loading-spinner-on);
}

button.activity-refresh {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
}

.activity-refresh svg {
	width: 16px;
	height: 16px;
}

.activity-coverage {
	margin: -0.5rem 0 1.25rem;
	font-size: var(--small-text);
}

/* Second filter row: days of the week and hours. */
.activity-filters + .activity-filters {
	margin-top: -0.5rem;
}

.activity-period.activity-weekdays button {
	padding-left: 0.6rem;
	padding-right: 0.6rem;
}

.activity-range,
.activity-hours {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

input.activity-date {
	width: auto;
	padding: 0.5rem 0.75rem;
	border-color: var(--lighter-border);
	border-radius: 8px;
}

.activity-select.activity-hour {
	min-width: 120px;
}

/* By day / By hour, in the chart heading. */
.activity-period.activity-view button {
	padding: 0.25rem 0.75rem;
	font-size: var(--small-text);
}

/* Refetch keeps the last numbers on screen, dimmed, rather than flashing a loading state. */
.activity {
	transition: opacity var(--fast-transition);
}

.activity.is-refreshing {
	opacity: 0.55;
}

.activity-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1rem;
}

.activity-tile {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1.25rem;
	overflow: hidden;
}

.activity-tile-label {
	color: var(--secondary-text-color);
	font-weight: var(--semibold);
}

.activity-tile-value {
	font-size: calc(var(--default-font-size) * 2);
	font-weight: var(--bold);
}

.activity-tile-of {
	color: var(--secondary-text-color);
	font-size: var(--large-text);
	font-weight: var(--demisemibold);
}

.activity-tile-sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--small-text);
}

.activity-delta {
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
}

.activity-delta.is-up {
	color: var(--delta-up);
}

.activity-delta.is-down {
	color: var(--danger-color);
}

.activity-delta .muted {
	font-weight: var(--regular);
}

.activity-card {
	margin-top: 1rem;
	padding: 1.25rem 1.5rem;
}

.activity-card h3 {
	margin: 0;
	font-size: var(--large-text);
}

.activity-card-sub {
	margin: 0.125rem 0 0;
	font-size: var(--small-text);
}

.activity-card-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.activity-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

.activity-legend li {
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.activity-swatch {
	width: 10px;
	height: 10px;
	border-radius: 2px;
}

.activity-empty {
	margin: 2.5rem 0;
	text-align: center;
}

.activity-chart {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: 200px auto;
	column-gap: 0.5rem;
	margin-top: 1.25rem;
}

.activity-y {
	position: relative;
	min-width: 1.5rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.activity-y span {
	position: absolute;
	right: 0;
	transform: translateY(50%);
	line-height: 1;
}

.activity-plot {
	position: relative;
	display: flex;
	align-items: flex-end;
	border-bottom: 1px solid var(--chart-baseline);
	outline-offset: 4px;
}

.activity-grid {
	position: absolute;
	left: 0;
	right: 0;
	border-top: 1px solid var(--chart-grid);
	pointer-events: none;
}

/* The whole column is the hover target; the bar inside stays thin. */
.activity-col {
	position: relative;
	display: flex;
	flex: 1;
	align-items: flex-end;
	justify-content: center;
	height: 100%;
	min-width: 0;
}

.activity-col.is-hover {
	background: #8881;
}

.activity-stack {
	display: flex;
	flex-direction: column-reverse;
	gap: 2px;
	width: 70%;
	max-width: 24px;
	border-radius: 4px 4px 0 0;
	overflow: hidden;
}

.activity-stack span {
	flex-basis: 0;
	min-height: 2px;
}

.activity-x {
	grid-column: 2;
	display: flex;
	padding-top: 0.375rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

.activity-x span {
	flex: 1;
	min-width: 0;
	overflow: visible;
	text-align: center;
	white-space: nowrap;
}

.activity-tooltip {
	position: absolute;
	top: 0;
	z-index: 2;
	min-width: 160px;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--modal-detail-bkg-color);
	box-shadow: 0 4px 16px #0002;
	transform: translateX(-50%);
	pointer-events: none;
}

.activity-tooltip.is-start {
	transform: translateX(-1rem);
}

.activity-tooltip.is-end {
	transform: translateX(calc(-100% + 1rem));
}

.activity-tooltip-title {
	margin-bottom: 0.375rem;
	font-weight: var(--semibold);
}

.activity-tooltip-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--small-text);
}

.activity-tooltip-row strong {
	min-width: 1.5rem;
	font-variant-numeric: tabular-nums;
}

.activity-key {
	width: 12px;
	height: 2px;
	border-radius: 1px;
}

.activity-table-view {
	margin-top: 1rem;
}

.activity-table-view summary {
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	cursor: pointer;
}

/* width: 0 keeps a wide table from stretching the page (a flex item) past the screen; it scrolls instead. */
.activity-scroll {
	width: 0;
	min-width: 100%;
	overflow-x: auto;
}

.activity-member .team-account-name,
.activity-table td.activity-last {
	white-space: nowrap;
}

.activity-table th.num,
.activity-table td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.activity-table th {
	white-space: nowrap;
}

button.activity-sort,
button.activity-sort:hover {
	padding: 0;
	background: none;
	color: inherit;
	font: inherit;
}

button.activity-sort:hover {
	color: var(--main-text-color);
}

button.activity-member,
button.activity-member:hover {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 0;
	background: none;
	color: var(--main-text-color);
	text-align: left;
}

button.activity-member:hover .team-account-name {
	text-decoration: underline;
}

.team-table tr.is-disabled .activity-member {
	opacity: 0.6;
}

.activity-overdue {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.activity-attention {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1rem;
}

.activity-attention-card {
	padding: 1.25rem 1.5rem;
}

.activity-attention-card h3 {
	margin: 0 0 0.5rem;
	font-size: var(--large-text);
}

.activity-attention-card p {
	margin: 0.5rem 0 0;
}

.activity-attention ul,
.activity-stale ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

a.activity-attention-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--lighter-border);
	color: inherit;
	text-decoration: none;
}

.activity-attention li:last-child a.activity-attention-item,
.activity-stale li:last-child a.activity-attention-item {
	border-bottom: none;
}

a.activity-attention-item:hover .team-account-name {
	text-decoration: underline;
}

.activity-attention-item > svg {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--secondary-text-color);
}

.activity-attention-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.activity-attention-text .muted {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

p.activity-more {
	font-size: var(--small-text);
}

.activity-stale {
	margin-top: 1rem;
	padding: 1rem 1.5rem;
}

.activity-stale summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	cursor: pointer;
}

.activity-stale ul {
	margin-top: 0.5rem;
}

.activity-stores {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.activity-stores li {
	display: grid;
	grid-template-columns: minmax(8rem, 12rem) 1fr;
	align-items: center;
	column-gap: 1rem;
}

.activity-store-name {
	font-weight: var(--semibold);
}

.activity-store-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.activity-store-bar span:first-child {
	height: 14px;
	min-width: 2px;
	max-width: calc(100% - 3rem);
	border-radius: 0 4px 4px 0;
	background: var(--series-1);
}

.activity-store-value {
	font-weight: var(--semibold);
	font-variant-numeric: tabular-nums;
}

.activity-store-meta {
	grid-column: 2;
	font-size: var(--small-text);
}

.activity-store-overdue {
	color: var(--danger-color);
}

/* Dashboard Insights (dashboard-insights): up to three cards under the filters, and their evidence drawer. */

dashboard-insights {
	display: block;
	margin-bottom: 1.5rem;
}

.insights-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
}

.insights-heading h2,
.insight-note h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.insights-icon svg {
	display: block;
	width: 1.25em;
	height: 1.25em;
	color: var(--highlight);
}

.insights-sub,
.insights-status {
	margin: 0.25rem 0 0.75rem;
}

.insights-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.insight-card {
	display: flex;
	flex: 1 1 260px;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	min-width: 0;
	padding: 1rem 1.25rem;
	border-top: 3px solid var(--light-secondary);
}

.insight-card.is-work {
	border-top-color: light-dark(#e3a33b, #b97f22);
}

.insight-card h3 {
	margin: 0.25rem 0 0;
	font-size: var(--large-text);
}

.insight-card p {
	margin: 0;
}

.insight-basis {
	margin: 0;
}

.insight-next {
	flex: 1;
	font-weight: var(--demisemibold);
}

button.insight-link,
button.insight-link:hover {
	display: flex;
	align-items: center;
	justify-content: space-between;
	align-self: stretch;
	gap: 0.5rem;
	margin-top: 0.25rem;
	padding: 0;
	background: none;
	color: var(--highlight);
	font-weight: var(--semibold);
	text-align: left;
}

button.insight-link:hover span {
	text-decoration: underline;
}

.insight-link svg {
	flex: none;
	width: 18px;
	height: 18px;
}

.insight-card.is-skeleton {
	gap: 0.75rem;
	min-height: 150px;
	border-top-color: var(--lighter-border);
}

.insight-card.is-skeleton span {
	width: 85%;
	height: 0.75rem;
	border-radius: 999px;
	background: var(--tertiary-bkg-color);
	animation: insight-pulse 1.4s ease-in-out infinite;
}

.insight-card.is-skeleton span:nth-child(2) {
	width: 65%;
}

@keyframes insight-pulse {
	50% {
		opacity: 0.45;
	}
}

@media (prefers-reduced-motion: reduce) {
	.insight-card.is-skeleton span {
		animation: none;
	}
}

.insight-note {
	display: flex;
	flex: 2 1 320px;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.25rem 1.5rem;
	background: var(--detail-bkg-color);
}

.insight-note p {
	margin: 0;
}

.insight-small {
	font-size: var(--small-text);
}

/* The evidence drawer: a modal dialog docked to the right edge, full width on phones. */
.insight-drawer {
	width: min(440px, 100vw);
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0 0 0 auto;
	padding: 1.5rem 1.75rem 2rem;
	overflow-y: auto;
	border: none;
	border-left: 1px solid var(--lighter-border);
	background: var(--alt-bkg-color);
	color: var(--main-text-color);
	box-shadow: -16px 0 48px #00000033;
}

.insight-drawer::backdrop {
	background: #00000059;
}

.insight-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.insight-drawer-header h2 {
	margin: 0;
}

.insight-drawer h3 {
	margin: 0.75rem 0;
	font-size: var(--header-text);
	line-height: 1.2;
}

.insight-drawer h4 {
	margin: 1.5rem 0 0.75rem;
}

.insight-scope {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: var(--light-pop);
	font-size: var(--small-text);
}

.insight-bars {
	display: flex;
	align-items: stretch;
	gap: 0.375rem;
	height: 160px;
}

.insight-bar {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
}

.insight-bar-fill {
	width: 100%;
	min-height: 2px;
	border-radius: 4px 4px 0 0;
	background: var(--light-secondary-background);
}

.insight-bar.is-highlight .insight-bar-fill {
	background: var(--highlight);
}

.insight-bar-value,
.insight-bar-label {
	font-size: var(--small-text);
	white-space: nowrap;
}

.insight-bar-label {
	color: var(--secondary-text-color);
}

.insight-bar.is-highlight .insight-bar-value {
	color: var(--highlight);
	font-weight: var(--bold);
}

.insight-rows {
	margin: 1rem 0 0;
}

.insight-rows div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--lighter-border);
}

.insight-rows dd {
	margin: 0;
	font-weight: var(--bold);
}

.insight-items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.insight-items li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--lighter-border);
}

.insight-items li > a,
.insight-items li {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.insight-items a:hover .team-account-name {
	text-decoration: underline;
}

.insight-drawer-action {
	display: block;
	width: 100%;
	margin-top: 1.5rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	background: var(--attention-button-bkg);
	color: var(--attention-button-text);
	font-weight: var(--semibold);
	text-align: center;
	text-decoration: none;
}

a.insight-drawer-action:hover {
	background: var(--attention-button-bkg-hover);
}

@media (max-width: 560px) {
	.activity-tiles {
		grid-template-columns: 1fr 1fr;
	}

	.activity-tile-value {
		font-size: 1.5rem;
	}

	.activity-card,
	.activity-attention-card,
	.activity-stale {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.activity-stores li {
		grid-template-columns: 1fr;
	}

	.activity-store-meta {
		grid-column: 1;
	}
}

/* Customer Projects (/apps/customer-projects, and the phone upload page /upload). Builds on the Manage team styles. */

.projects-toolbar {
	display: flex;
	gap: 1rem;
}

.search-field.projects-search {
	flex: 1;
	margin-top: 0;
}

.projects-search input {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	font-size: var(--default-font-size);
}

.team-select.projects-filter {
	flex: none;
	width: 240px;
}

.projects-filter select {
	height: 100%;
	font-weight: var(--demisemibold);
}

.projects-scope {
	margin: 0.75rem 0 1rem;
}

.projects-row {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, 1fr) 20px;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--lighter-border);
	color: inherit;
	text-decoration: none;
}

a.projects-row:hover {
	background: var(--detail-bkg-color);
}

.projects-list .projects-row:last-child {
	border-bottom: none;
}

.projects-row.projects-head {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
}

.projects-list .team-empty {
	margin: 0;
	padding: 2rem 1.5rem;
	text-align: center;
}

.projects-customer {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.projects-folder-icon,
.projects-chevron {
	display: flex;
	color: var(--pop);
}

.projects-chevron {
	color: var(--secondary-text-color);
}

.projects-folder-icon svg,
.projects-file-thumb svg {
	width: 26px;
	height: 26px;
}

/* The file's icon, covered by the image itself when the browser can show it. */
.projects-file-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--main-bkg-color);
	color: var(--secondary-text-color);
}

.projects-file-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.projects-chevron svg {
	width: 18px;
	height: 18px;
}

.projects-name {
	font-size: var(--large-text);
	font-weight: var(--demisemibold);
	overflow-wrap: anywhere;
}

.projects-when {
	font-weight: var(--semibold);
}

.projects-when.status-today,
.projects-due.status-today,
.projects-followup.status-today {
	color: var(--pop);
}

.projects-when.status-overdue,
.projects-due.status-overdue,
.projects-followup.status-overdue {
	color: var(--danger-color);
}

.projects-due.status-today,
.projects-due.status-overdue {
	font-weight: var(--semibold);
}

button.projects-more {
	display: block;
	margin: 1rem auto 0;
}

button.team-add.projects-empty-add {
	min-width: 0;
	margin-top: 1.25rem;
	padding: 0.7rem 1.75rem;
	font-size: var(--default-font-size);
}

/* Customer folder */

.projects-folder .team-heading {
	margin-bottom: 1.25rem;
}

.projects-folder .projects-scope {
	margin: 0.25rem 0 0;
}

.projects-contact {
	display: flex;
	align-items: center;
	gap: 3rem;
	padding: 1rem 1.5rem;
	margin-bottom: 1.5rem;
}

.projects-contact .text-button {
	margin-left: auto;
}

.projects-label {
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
}

.projects-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 1.5rem;
	align-items: start;
}

.projects-side {
	display: grid;
	gap: 1.25rem;
}

.projects-section-heading {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 0.75rem;
}

.projects-section-heading:not(:first-child) {
	margin-top: 1.5rem;
}

.projects-section-heading > :last-child {
	margin-left: auto;
}

.projects-out {
	color: var(--pop);
	font-weight: var(--semibold);
}

button.btn-secondary.projects-loan {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--alt-bkg-color);
	color: var(--main-text-color);
	font-weight: var(--semibold);
}

.projects-loan svg {
	width: 16px;
	height: 16px;
}

.projects-rows {
	padding: 0.25rem 1.25rem;
}

.projects-rows-head {
	padding: 0.5rem 0;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
	font-weight: var(--demisemibold);
}

.projects-file,
.projects-swatch {
	display: grid;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 0;
	border-top: 1px solid var(--lighter-border);
}

.projects-file {
	grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.projects-swatch {
	grid-template-columns: minmax(0, 1fr) 7rem 3rem 10rem;
}

.projects-swatch.projects-rows-head {
	border-top: none;
}

.projects-file .text-button {
	text-decoration: none;
}

.projects-file .projects-name,
.projects-swatch .projects-name {
	font-size: var(--default-font-size);
	font-weight: var(--semibold);
}

.projects-sub {
	font-size: var(--small-text);
}

.projects-returned {
	color: light-dark(var(--tag-success), #7fd174);
}

.projects-swatch.is-returned .projects-due {
	opacity: 0.6;
}

button.projects-soft,
button.projects-soft:hover {
	padding: 0.6rem 1rem;
	border-radius: 8px;
	background: var(--tag-pending-bkg);
	color: var(--pop);
	font-weight: var(--semibold);
}

button.projects-soft:hover {
	background: var(--button-background-selected);
	text-decoration: underline;
}

button.projects-soft:disabled,
button.projects-soft:disabled:hover {
	background: var(--tag-pending-bkg);
	color: var(--pop);
	opacity: 0.5;
	text-decoration: none;
}

.projects-card {
	padding: 1.25rem;
}

.projects-card h2 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	font-size: var(--large-text);
}

.projects-card h2 svg {
	width: 22px;
	height: 22px;
	color: var(--pop);
}

.projects-card p {
	margin: 0 0 0.75rem;
}

.projects-followup {
	font-size: 1.25rem;
	font-weight: var(--semibold);
}

.projects-card-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

button.projects-wide {
	width: 100%;
}

textarea.team-list.projects-note-input {
	min-height: 4.5rem;
}

button.projects-save-note {
	display: block;
	margin: 0.75rem 0 1rem auto;
}

.projects-note {
	padding-top: 0.75rem;
	border-top: 1px solid var(--lighter-border);
}

.projects-note + .projects-note {
	margin-top: 0.75rem;
}

.projects-note p {
	margin: 0 0 0.25rem;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

/* Customer Projects dialogs */

.projects-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.team-dialog.projects-upload {
	width: min(820px, calc(100vw - 2rem));
}

.projects-upload-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.projects-upload-panel {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border: 1px solid var(--lighter-border);
	border-radius: 12px;
}

.projects-upload-panel h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.5rem;
	font-size: var(--large-text);
}

.projects-upload-panel h3 svg {
	width: 22px;
	height: 22px;
	color: var(--pop);
}

.team-dialog .projects-upload-panel p {
	margin: 0;
}

.btn-secondary.projects-choose {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--alt-bkg-color);
	color: var(--main-text-color);
	font-weight: var(--semibold);
	cursor: pointer;
}

.projects-choose svg {
	width: 18px;
	height: 18px;
}

.projects-choose:has(input:focus-visible) {
	outline: 2px solid var(--focus);
}

.projects-upload-panel button.team-dialog-submit {
	width: 100%;
	padding: 0.7rem 1.5rem;
	border-radius: 8px;
	font-weight: var(--semibold);
}

.projects-picked {
	margin: 0;
	padding: 0;
	list-style: none;
}

.projects-picked li {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.375rem 0;
}

.projects-picked li > svg {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--secondary-text-color);
}

.projects-picked span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.projects-qr {
	display: flex;
	justify-content: center;
}

.projects-qr svg {
	width: 140px;
	height: 140px;
}

/* Holds the QR code's place while the upload link loads, so the panel doesn't jump. */
.projects-qr-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 140px;
	height: 140px;
	border: 1px dashed var(--icon-outline);
	border-radius: 8px;
	text-align: center;
}

.projects-qr-loading .spinner {
	border-top-color: var(--loading-spinner-on);
}

.projects-qr-loading .muted {
	margin: 0;
}

.projects-upload .team-dialog-actions {
	align-items: center;
}

.projects-upload .team-dialog-actions p {
	margin: 0;
}

/* Phone upload page (/upload) */

.flow-card.projects-phone {
	max-width: 440px;
}

.projects-phone h1 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.projects-phone-brand {
	display: flex;
	justify-content: center;
	padding-bottom: 1.25rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--lighter-border);
}

.projects-phone-brand img {
	max-width: 220px;
	max-height: 56px;
}

.projects-phone .projects-picked {
	margin-top: 0.75rem;
}

.projects-phone .projects-picked li {
	margin-bottom: 0.5rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--lighter-border);
	border-radius: 8px;
	background: var(--detail-bkg-color);
}

button.cta.projects-phone-send {
	margin-top: 1.5rem;
}

.projects-phone-done {
	text-align: center;
}

.projects-phone-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	margin: 0.5rem 0 1.25rem;
	border-radius: 50%;
	background: var(--tag-success-bkg);
	color: light-dark(var(--tag-success), #7fd174);
}

.projects-phone-check svg {
	width: 44px;
	height: 44px;
}

@media (max-width: 750px) {
	.projects-toolbar,
	.projects-contact {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.team-select.projects-filter {
		width: 100%;
	}

	.projects-contact .text-button {
		margin-left: 0;
		align-self: flex-start;
	}

	.projects-row {
		grid-template-columns: minmax(0, 1fr) 20px;
		padding: 0.875rem 1rem;
	}

	.projects-row > div:not(.projects-customer) {
		grid-column: 1;
		padding-left: 42px;
	}

	.projects-row .projects-chevron {
		grid-row: 1;
		grid-column: 2;
	}

	.projects-row.projects-head {
		display: none;
	}

	.projects-columns,
	.projects-field-row,
	.projects-upload-panels {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.projects-upload-panels {
		gap: 1rem;
	}

	.projects-swatch {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.projects-section-heading {
		flex-wrap: wrap;
	}

	.projects-side {
		margin-top: 1.5rem;
	}
}

/* User menu (store header chip + dropdown), with the Dashboard link before it */

user-menu {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.user-menu {
	position: relative;
}

.header-dashboard {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	color: var(--main-text-color);
	font-size: 1.125rem;
	font-weight: var(--demisemibold);
	text-decoration: none;
}

.header-dashboard:hover,
.header-dashboard[aria-current="page"] {
	background: var(--light-secondary-highlight);
	color: var(--brand-primary);
}

.header-dashboard svg {
	width: 22px;
	height: 22px;
}

button.user-chip,
button.user-chip:hover {
	background: var(--alt-bkg-color);
	padding-right: 1rem;
	cursor: pointer;
}

button.user-chip:hover {
	border-color: var(--light-border);
}

.user-chevron svg {
	display: block;
	width: 20px;
	height: 20px;
}

.user-menu-list {
	position: absolute;
	z-index: 30;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 240px;
	padding: 0.375rem;
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 10px;
	box-shadow: 0 8px 24px #0000001f;
}

.user-menu-identity {
	padding: 0.5rem 1rem 0.625rem;
	line-height: 1.4;
}

.user-menu-name {
	font-weight: var(--bold);
	font-size: var(--large-text);
}

.user-menu-badge {
	display: inline-block;
	margin-top: 0.375rem;
	padding: 0.125rem 0.5rem;
	border-radius: 6px;
	background: var(--main-bkg-color);
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

.user-menu-list hr {
	margin: 0.375rem 0;
	border: none;
	border-top: 1px solid var(--lighter-border);
}

.user-menu-list a,
.user-menu-list button,
.user-menu-list button:disabled {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	text-align: left;
	background: none;
	color: var(--main-text-color);
}

.user-menu-list a.admin {
	color: var(--pop);
	font-weight: var(--bold);
}

.user-menu-list a {
	padding: 0.6rem 1rem;
	border-radius: 8px;
	text-decoration: none;
}

.user-menu-list a:hover {
	background: var(--light-secondary-highlight);
	color: var(--brand-primary);
}

.user-menu-list button:hover {
	background: var(--main-bkg-color);
}

.user-menu-list svg {
	flex: none;
	width: 20px;
	height: 20px;
}

/* Stanton catalog: style pickers shared by Draping and Sectionals */

.catalog {
	--stanton: #004275;
	--stanton-hover: #00335b;
	--stanton-text: light-dark(#004275, #8cbbe6);
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 2rem 1.5rem 1rem;
	line-height: 1.5;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--secondary-text-color);
	font-size: 1.0625rem;
	text-decoration: none;
}

.back-link:hover span {
	text-decoration: underline;
}

.back-link svg {
	width: 20px;
	height: 20px;
}

.catalog-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: 0.5rem;
}

.catalog h1 {
	margin: 0;
	font-size: 2.5rem;
	line-height: 1.2;
}

.catalog-subtitle {
	margin: 0.25rem 0 0;
	font-size: 1.375rem;
	color: var(--secondary-text-color);
}

.catalog-brand {
	display: block;
	height: 48px;
	width: auto;
	margin-top: 0.25rem;
	object-fit: contain;
}

/* The Stanton logo is drawn for white (navy lettering, white edge pixels), so dark mode puts it on a
   white badge. The box-shadow spread pads the badge without moving or resizing the logo. */
.catalog-brand,
.service-brand {
	border-radius: 4px;
	background: light-dark(transparent, #fff);
	box-shadow: 0 0 0 0.375rem light-dark(transparent, #fff);
}

.search-field {
	position: relative;
	display: block;
	margin-top: 1.75rem;
}

.search-field svg {
	position: absolute;
	left: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	color: var(--secondary-text-color);
	pointer-events: none;
}

.search-field input {
	padding: 1rem 1.25rem 1rem 3.5rem;
	border-color: var(--lighter-border);
	border-radius: 8px;
	font-size: 1.125rem;
}

.catalog h2 {
	margin: 1.75rem 0 0.75rem;
	font-size: 1.375rem;
}

.style-list {
	display: grid;
	gap: 0.875rem;
}

.style-row {
	background: var(--alt-bkg-color);
	border: 1px solid var(--lighter-border);
	border-radius: 10px;
}

.style-summary {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding: 0.875rem 1.25rem 0.875rem 0.875rem;
	cursor: pointer;
}

/* Sectionals rows are links straight into Nexus. */
a.style-summary {
	color: inherit;
	text-decoration: none;
}

a.style-summary:hover .btn-outline {
	background: var(--main-bkg-color);
}

/* Product photos have white backgrounds; a fixed light swatch + multiply blends them in both themes. */
.product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 8px;
	background: #f2f1ef;
	overflow: hidden;
}

.product-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.style-thumb {
	width: 200px;
	height: 92px;
}

.style-info {
	flex: 1;
	min-width: 0;
}

.style-info h3 {
	margin: 0;
	font-size: 1.5rem;
}

.style-info p {
	margin: 0.125rem 0 0;
	font-size: 1.125rem;
	color: var(--secondary-text-color);
}

.btn-outline,
.btn-outline:hover {
	display: inline-block;
	flex-shrink: 0;
	background: var(--alt-bkg-color);
	color: var(--stanton-text);
	border: 1.5px solid currentColor;
	border-radius: 8px;
	padding: 0.625rem 1.25rem;
	font-size: 1.0625rem;
	font-weight: var(--semibold);
}

.btn-outline:hover {
	background: var(--main-bkg-color);
}

.style-chevron svg {
	display: block;
	width: 28px;
	height: 28px;
	color: var(--secondary-text-color);
	transition: transform var(--fast-transition) ease;
}

.style-row.open .style-chevron svg {
	transform: rotate(180deg);
}

.frame-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem;
	margin: 0 1.25rem;
	padding: 0.875rem 0 1.25rem;
	border-top: 1px solid var(--lighter-border);
}

.frame-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--lighter-border);
	border-radius: 10px;
	padding: 1rem;
}

/* Frames sit straight on the (white) card in light mode. In dark mode they need the light swatch too:
   multiply-blending a photo onto a near-black card turns it near-black. */
.frame-card-image {
	height: 150px;
	background: light-dark(transparent, #f2f1ef);
}

.frame-card h4 {
	margin: 0.75rem 0 0.75rem 0.25rem;
	font-size: 1.25rem;
}

.btn-brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding: 0.75rem 1.25rem;
	background: var(--stanton);
	color: var(--white);
	font-size: 1.0625rem;
	font-weight: var(--demisemibold);
}

.btn-brand:hover {
	background: var(--stanton-hover);
}

.btn-brand svg {
	width: 22px;
	height: 22px;
}

/* Shown while a frame preloads, before the draping modal opens. Delayed so quick loads don't flash. */
.drape-loading {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #00000059;
	animation: drape-loading-in 0.2s ease 0.15s backwards;
}

.drape-loading-box {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 1.125rem 1.75rem;
	background: var(--alt-bkg-color);
	border-radius: 12px;
	box-shadow: 0 8px 24px #00000033;
	font-size: 1.125rem;
	font-weight: var(--demisemibold);
}

.spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--loading-spinner-off);
	border-top-color: var(--stanton-text);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes drape-loading-in {
	from {
		opacity: 0;
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 750px) {
	.catalog h1 {
		font-size: 2rem;
	}

	.catalog-subtitle {
		font-size: 1.125rem;
	}

	.catalog-brand {
		height: 32px;
	}

	.style-summary {
		gap: 1rem;
	}

	.style-thumb {
		width: 120px;
		height: 64px;
	}

	.style-chevron {
		display: none;
	}
}

@media (max-width: 560px) {
	.catalog-heading {
		flex-direction: column-reverse;
	}

	.style-thumb {
		display: none;
	}

	.style-info h3 {
		font-size: 1.25rem;
	}
}

.pyx-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 1.75rem 1rem;
	color: var(--secondary-text-color);
	font-size: var(--small-text);
}

.pyx-footer .logo {
	height: 25px;
	width: auto;
	aspect-ratio: 93 / 13;
}

/* Invite, signup and sign-in cards */

.card-page {
	padding: 6vh 1.25rem 2rem;
}

.flow-card {
	width: 100%;
	max-width: 672px;
	margin: auto;
	padding: 2.25rem;
	background: var(--alt-bkg-color);
	border: 1px solid var(--section-border);
	border-radius: 16px;
	box-shadow: 0 12px 32px #1a1a3312;
	font-size: 1.125rem;
	/* body's line-height is 1.5em, which freezes at the 14px base; unitless scales with this larger text. */
	line-height: 1.5;
}

.card-heading {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	margin-bottom: 1.5rem;
}

.card-heading h1 {
	margin: 0;
	font-size: 1.75rem;
	line-height: 1.25;
}

.card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--icon-spot);
	color: var(--icon-brand);
}

.card-icon svg {
	width: 22px;
	height: 22px;
}

.card-welcome {
	margin: 0 0 0.75rem;
	font-weight: var(--demisemibold);
}

.card-text {
	margin: 0 0 1.25rem;
	color: var(--secondary-text-color);
}

.card-footnote {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 1rem;
	color: var(--secondary-text-color);
}

.status-line {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1rem;
	color: var(--tag-success);
	font-size: 1rem;
	font-weight: var(--demisemibold);
}

.status-line svg {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
}

.plan-box {
	margin-bottom: 2rem;
	padding: 1.5rem;
	border: 1px solid light-dark(#e6ddfa, var(--brand-primary-20percent));
	border-radius: 12px;
	background: light-dark(#f8f5ff, var(--light-pop));
}

.plan-box-label {
	margin: 0;
	font-size: 1rem;
	font-weight: var(--demisemibold);
}

.plan-box-price {
	margin: 0.25rem 0 0.5rem;
	font-size: 3rem;
	font-weight: var(--bold);
	line-height: 1.1;
}

.plan-box-price .unit {
	margin-left: 0.35rem;
	font-size: 1.25rem;
	font-weight: var(--regular);
	color: var(--secondary-text-color);
}

.plan-box-note {
	margin: 0;
	font-size: 1rem;
	color: var(--secondary-text-color);
}

/* Labeled form fields (label above the input, optional helper below) */

.form-field {
	margin-bottom: 1.25rem;
}

.form-field label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 1rem;
	font-weight: var(--demisemibold);
}

.form-label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.form-field input {
	padding: 0.9rem 1rem;
	border-radius: 8px;
	font-size: 1.125rem;
}

.form-field input:focus {
	outline: 2px solid var(--focus);
	outline-offset: 1px;
}

.form-helper {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.875rem;
	color: var(--secondary-text-color);
}

.password-input {
	position: relative;
}

.password-input input {
	padding-right: 5rem;
}

.show-toggle,
.show-toggle:hover {
	position: absolute;
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
	padding: 0.25rem 0.5rem;
	background: none;
	color: var(--pop);
	font-weight: var(--demisemibold);
}

.show-toggle:hover {
	text-decoration: underline;
}

.text-link {
	color: var(--pop);
	font-size: 1rem;
	font-weight: var(--demisemibold);
	text-decoration: none;
}

.text-link:hover {
	text-decoration: underline;
}

.checkbox-field {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 0.75rem;
	margin-bottom: 1.75rem;
	cursor: pointer;
}

.checkbox-field input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--brand-primary);
}

.checkbox-field .form-helper {
	grid-column: 2;
	margin-top: 0.15rem;
}

/* Primary call to action: full width, label centered, arrow pinned right */

.cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	padding: 0.9rem 3.5rem;
	border-radius: 8px;
	background: var(--attention-button-bkg);
	color: var(--attention-button-text);
	font-size: 1.125rem;
	font-weight: var(--demisemibold);
	text-decoration: none;
}

.cta:hover {
	background: var(--attention-button-bkg-hover);
}

.cta svg {
	position: absolute;
	right: 1.5rem;
	width: 22px;
	height: 22px;
}

.flow-card .error {
	font-size: 1rem;
}

.flow-card .error:not(:empty) {
	margin-top: 0.75rem;
}

@media (max-width: 750px) {
	.store-header {
		min-height: 72px;
		padding: 0.75rem 1rem;
	}

	.store-header-brand {
		gap: 1rem;
	}

	.store-logo {
		height: 40px;
		max-width: 140px;
	}

	.store-header-title {
		font-size: 1rem;
	}

	.store-header-tagline,
	.user-name,
	.header-dashboard-label {
		display: none;
	}

	.user-chip {
		padding: 0.25rem;
	}

	.flow-card {
		padding: 1.5rem;
	}

	.workspace h1 {
		font-size: 2rem;
	}

	.cta {
		padding: 0.9rem 3rem;
	}
}

/* Phones: the dealer logo and user controls need the whole header row. */
@media (max-width: 560px) {
	.store-header-divider,
	.store-header-title {
		display: none;
	}
}

/* Embedded apps (Nexus): the store header and app bar stay, the app fills the rest of the viewport. */

.app-frame {
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
}

.app-bar {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 0.625rem 3rem;
	background: var(--alt-bkg-color);
	border-bottom: 1px solid var(--section-border);
}

.app-bar-title {
	font-size: 1.0625rem;
	font-weight: var(--semibold);
}

.app-bar-title::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 1.1em;
	margin-right: 1.25rem;
	vertical-align: -0.15em;
	background: var(--rule-color);
}

.app-frame-body {
	position: relative;
	flex: 1;
	min-height: 0;
}

pyxd-nexus {
	position: absolute;
	inset: 0;
}

@media (max-width: 750px) {
	.app-bar {
		padding: 0.5rem 1rem;
	}
}

/* Nexus prints its own tear sheet; leave our chrome off the page. */
@media print {
	.app-frame .store-header,
	.app-frame .app-bar {
		display: none;
	}
}

.placeholder {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2rem 1.25rem;
}
