/**
 * Customer dashboard.
 *
 * Inherits every colour and type token from checkout.css via the .bif365 class
 * on the wrapper, so the brand blue, the fonts and the card treatment are the
 * same objects the checkout uses. Nothing here redefines the palette.
 */

.bif365-dash {
	max-width: 1180px;
}

/* ── layout ───────────────────────────────────────────────── */

.bif365-dash__grid {
	display: grid;
	grid-template-columns: 248px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.bif365-dash__side {
	position: sticky;
	top: 24px;
	background: var(--bif-surface);
	border: 1px solid var(--bif-line);
	border-radius: 20px;
	padding: 16px 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
}

.bif365-dash__main { min-width: 0; }

/* ── sidebar nav ──────────────────────────────────────────── */

.bif365-dash__nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bif365 .bif365-dash__link {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 11px 13px;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--bif-heading);
	font: inherit;
	font-size: 14.5px;
	font-weight: 500;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.bif365 .bif365-dash__link:hover,
.bif365 .bif365-dash__link:focus {
	background: var(--bif-primary-soft);
	color: var(--bif-heading);
}

/* Selected entry: white on the brand blue, the one high-contrast anchor in
   the sidebar so the current section is never ambiguous. */
.bif365 .bif365-dash__link.is-active,
.bif365 .bif365-dash__link.is-active:hover,
.bif365 .bif365-dash__link.is-active:focus {
	background: var(--bif-primary);
	color: #fff;
}

.bif365 .bif365-dash__link:focus-visible {
	outline: 3px solid var(--bif-primary-line);
	outline-offset: 2px;
}

.bif365-dash__ico {
	width: 20px;
	flex: 0 0 auto;
	text-align: center;
	font-size: 14px;
	line-height: 1;
	opacity: .85;
}

.bif365-dash__who {
	margin: 14px 0 12px;
	padding: 13px 13px 0;
	border-top: 1px solid var(--bif-line);
}

.bif365-dash__who p { margin: 0; }
.bif365-dash__who-label { font-size: 12px; color: var(--bif-muted); }
.bif365-dash__who-name { font-weight: 600; color: var(--bif-heading); }
.bif365-dash__who-handle {
	font-size: 13px;
	color: var(--bif-primary);
	word-break: break-all;
}

.bif365 .bif365-dash__out {
	display: block;
	width: 100%;
	text-align: center;
	text-decoration: none;
}

/* ── header ───────────────────────────────────────────────── */

.bif365-dash__head { margin: 0 0 20px; }

.bif365-dash__title {
	font-family: var(--e-global-typography-primary-font-family, "Outfit"), var(--bif-font);
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 700;
	color: var(--bif-heading);
	margin: 0 0 4px;
	line-height: 1.2;
}

.bif365-dash__title .bif365-dash__name { color: var(--bif-primary); }
.bif365-dash__wave { margin-left: 6px; }

.bif365-dash__lede {
	margin: 0;
	color: var(--bif-muted);
	font-size: 15px;
}

.bif365-dash__h {
	font-family: var(--e-global-typography-primary-font-family, "Outfit"), var(--bif-font);
	font-size: 18px;
	font-weight: 600;
	color: var(--bif-heading);
	margin: 26px 0 12px;
}

.bif365-dash__pane > .bif365-dash__h:first-child { margin-top: 0; }

/* ── cards ────────────────────────────────────────────────── */

.bif365-dash__card {
	background: var(--bif-surface);
	border: 1px solid var(--bif-line);
	border-radius: 18px;
	padding: 20px 22px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
}

/* Embedded shortcodes bring their own padding, so the card only frames them. */
.bif365-dash__embed { padding: 6px 14px; }
.bif365-dash__embed .bif365-acct { padding: 0; margin: 0; max-width: none; }

/* ── stat cards ───────────────────────────────────────────── */

.bif365-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
}

.bif365-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--bif-surface);
	border: 1px solid var(--bif-line);
	border-radius: 16px;
	padding: 15px 17px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.bif365-stat__k {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bif-muted);
}

.bif365-stat__v {
	font-size: 24px;
	font-weight: 700;
	color: var(--bif-heading);
	line-height: 1.15;
}

.bif365-stat__v .woocommerce-Price-amount { color: inherit; }

/* ── connected profile ────────────────────────────────────── */

.bif365-connect { padding: 16px 18px; }

.bif365-dash__tabs {
	display: flex;
	gap: 8px;
	margin: 0 0 14px;
	flex-wrap: wrap;
}

.bif365 .bif365-dash__tab {
	border: 1px solid var(--bif-line);
	border-radius: 999px;
	background: #fff;
	color: var(--bif-heading);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	padding: 8px 20px;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}

.bif365 .bif365-dash__tab:hover,
.bif365 .bif365-dash__tab:focus {
	background: var(--bif-primary-soft);
	border-color: var(--bif-primary-line);
	color: var(--bif-heading);
}

.bif365 .bif365-dash__tab.is-active,
.bif365 .bif365-dash__tab.is-active:hover,
.bif365 .bif365-dash__tab.is-active:focus {
	background: var(--bif-primary);
	border-color: var(--bif-primary);
	color: #fff;
}

.bif365-connect__found {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.bif365-connect__avatar {
	width: 68px;
	height: 68px;
	border-radius: 16px;
	object-fit: cover;
	background: var(--bif-primary-soft);
	flex: 0 0 auto;
}

.bif365-connect__meta { flex: 1 1 190px; min-width: 0; }
.bif365-connect__meta p { margin: 0; }

.bif365-connect__eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--bif-primary);
}

.bif365-connect__handle {
	font-size: 20px;
	font-weight: 700;
	color: var(--bif-heading);
	line-height: 1.2;
	word-break: break-all;
}

.bif365-connect__count {
	display: inline-flex;
	flex-direction: column;
	gap: 1px;
	margin-top: 8px !important;
	padding: 7px 14px;
	border: 1px solid var(--bif-line);
	border-radius: 12px;
	background: #fbfcfe;
}

.bif365-connect__count span {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bif-muted);
}

.bif365-connect__count strong {
	font-size: 18px;
	color: var(--bif-heading);
}

.bif365-connect__acts {
	display: flex;
	gap: 8px;
	margin-left: auto;
	flex-wrap: wrap;
}

.bif365-connect__ask .bif365-field__label { margin-bottom: 6px; }

.bif365-connect__msg {
	margin: 10px 0 0;
	font-size: 13.5px;
	color: var(--bif-muted);
}

.bif365-connect__msg.is-error { color: #b42318; }

/* ── quick buy ────────────────────────────────────────────── */

.bif365-quick {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bif365-quick--grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.bif365 .bif365-quick__btn {
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 14px 16px;
	border-radius: 14px;
	/* White on the brand blue, matching every other primary action. */
	background: var(--bif-primary);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .1);
	transition: transform .15s, filter .15s;
}

.bif365 .bif365-quick__btn:hover,
.bif365 .bif365-quick__btn:focus {
	transform: translateY(-2px);
	filter: brightness(1.06);
	color: #fff;
}

.bif365 .bif365-quick__btn:focus-visible {
	outline: 3px solid var(--bif-primary-line);
	outline-offset: 2px;
}

.bif365-quick__label { font-weight: 600; font-size: 14.5px; }
.bif365-quick__qty { font-size: 13px; opacity: .92; }

.bif365-quick__price { font-size: 13px; margin-top: 2px; }
.bif365-quick__price .woocommerce-Price-amount,
.bif365-quick__price del,
.bif365-quick__price ins { color: #fff; text-decoration-color: currentColor; }
.bif365-quick__price ins { text-decoration: none; font-weight: 600; }
.bif365-quick__price del { opacity: .7; margin-right: 5px; }

.bif365-dash__more { margin: 16px 0 0; font-size: 14px; }
.bif365-dash__more a { color: var(--bif-primary); }

/* ── settings ─────────────────────────────────────────────── */

.bif365-dash__facts {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 8px 16px;
	margin: 0 0 16px;
}

.bif365-dash__facts dt { color: var(--bif-muted); font-size: 14px; }
.bif365-dash__facts dd {
	margin: 0;
	color: var(--bif-heading);
	font-weight: 500;
	word-break: break-word;
}

.bif365-dash__note { margin: 0 0 16px; color: var(--bif-muted); font-size: 14px; }
.bif365-dash__acts { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.bif365 .bif365-dash__acts .bif365-btn { text-decoration: none; }

/* ── track form ───────────────────────────────────────────── */

.bif365-track__intro { margin: 0 0 14px; color: var(--bif-muted); font-size: 14.5px; }

.bif365-track__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin: 0 0 14px;
}

.bif365-track__field { display: block; }

.bif365-track__field span {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--bif-heading);
}

.bif365 .bif365-track__field input {
	width: 100%;
	padding: 12px 14px !important;
	border: 1.5px solid var(--bif-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--bif-heading) !important;
	font: inherit !important;
	font-size: 15px !important;
}

.bif365 .bif365-track__field input:focus {
	border-color: var(--bif-primary) !important;
	outline: 3px solid var(--bif-primary-line);
	outline-offset: 1px;
}

/* ── sign-in wall + WordPress' own login form ─────────────── */

.bif365-dash-gate { max-width: 520px; }

.bif365 #bif365-dash-login p,
.bif365 #bif365-login p { margin: 0 0 14px; }

.bif365 #bif365-dash-login label,
.bif365 #bif365-login label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--bif-heading);
}

.bif365 #bif365-dash-login input[type="text"],
.bif365 #bif365-dash-login input[type="password"],
.bif365 #bif365-login input[type="text"],
.bif365 #bif365-login input[type="password"] {
	width: 100%;
	padding: 13px 15px !important;
	border: 1.5px solid var(--bif-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--bif-heading) !important;
	font: inherit !important;
	font-size: 15.5px !important;
	box-shadow: none !important;
}

.bif365 #bif365-dash-login input:focus,
.bif365 #bif365-login input:focus {
	border-color: var(--bif-primary) !important;
	outline: 3px solid var(--bif-primary-line);
	outline-offset: 1px;
}

.bif365 .login-remember label,
.bif365 #bif365-dash-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	color: var(--bif-muted);
}

.bif365 #bif365-dash-login input[type="submit"],
.bif365 #bif365-login input[type="submit"] {
	width: 100%;
	padding: 13px 20px !important;
	border: 1px solid var(--bif-primary) !important;
	border-radius: 12px !important;
	background: var(--bif-primary) !important;
	color: #fff !important;
	font: inherit !important;
	font-size: 15.5px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	cursor: pointer;
}

.bif365 #bif365-dash-login input[type="submit"]:hover,
.bif365 #bif365-login input[type="submit"]:hover { filter: brightness(1.06); }

.bif365-gate__links {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin: 16px 0 0;
	font-size: 14.5px;
}

.bif365-gate__links a { color: var(--bif-primary); }

.bif365-gate__hint {
	margin: 14px 0 0;
	font-size: 13.5px;
	color: var(--bif-muted);
}

/* ── mobile drawer ────────────────────────────────────────── */

.bif365-dash__burger { display: none; }
.bif365-dash__scrim { display: none; }

@media (max-width: 880px) {
	.bif365-dash__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }

	.bif365 .bif365-dash__burger {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		margin: 0 0 16px;
		padding: 10px 16px;
		border: 1px solid var(--bif-line);
		border-radius: 12px;
		background: #fff;
		color: var(--bif-heading);
		font: inherit;
		font-size: 14.5px;
		font-weight: 500;
		cursor: pointer;
	}

	.bif365-dash__burger-bars,
	.bif365-dash__burger-bars::before,
	.bif365-dash__burger-bars::after {
		display: block;
		width: 17px;
		height: 2px;
		border-radius: 2px;
		background: var(--bif-heading);
		content: "";
	}

	.bif365-dash__burger-bars { position: relative; }
	.bif365-dash__burger-bars::before { position: absolute; top: -5px; }
	.bif365-dash__burger-bars::after { position: absolute; top: 5px; }

	/* Off-canvas rather than a pushdown: the drawer must not shove the
	   welcome header off screen every time it opens. */
	.bif365-dash__side {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1001;
		width: min(84vw, 300px);
		height: 100%;
		border-radius: 0 18px 18px 0;
		overflow-y: auto;
		transform: translateX(-102%);
		transition: transform .22s ease;
	}

	.bif365-dash.is-open .bif365-dash__side { transform: none; }

	.bif365-dash__scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(16, 24, 40, .45);
	}

	.bif365-dash__scrim[hidden] { display: none; }

	.bif365-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.bif365-stat { padding: 13px 14px; }
	.bif365-stat__v { font-size: 21px; }

	.bif365-dash__card { padding: 16px 15px; border-radius: 16px; }
	.bif365-dash__embed { padding: 4px 10px; }

	.bif365-connect__acts { margin-left: 0; width: 100%; }
	.bif365 .bif365-connect__acts .bif365-btn { flex: 1 1 auto; }
	.bif365-connect__avatar { width: 56px; height: 56px; }
	.bif365-connect__handle { font-size: 18px; }

	.bif365-dash__facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
	.bif365-dash__facts dd { margin-bottom: 10px; }
}

@media (max-width: 420px) {
	/* Stats stay 2x2 — one per row would push everything else off screen. */
	.bif365-stat { padding: 12px 12px; }
	.bif365-stat__k { font-size: 10px; }
	.bif365-stat__v { font-size: 19px; }
	.bif365-quick { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.bif365-dash__side { transition: none; }
	.bif365 .bif365-quick__btn { transition: none; }
}

/* ── sign-in wall: login / create-account tabs ─────────────── */

.bif365-gate__tabs {
	display: flex;
	gap: 6px;
	margin: 0 0 18px;
	padding: 4px;
	background: #f3f5f8;
	border-radius: 12px;
}

.bif365 .bif365-gate__tab {
	flex: 1 1 0;
	padding: 9px 14px;
	border: 0;
	border-radius: 9px;
	background: none;
	color: var(--bif-muted);
	font: inherit;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.bif365 .bif365-gate__tab:hover,
.bif365 .bif365-gate__tab:focus { color: var(--bif-heading); background: none; }

/* Selected tab is white on the tinted track, so the label stays dark.
   Forced: the theme's blanket button reset also sets a background on this
   element, and losing that race leaves the selected tab invisible. */
.bif365 .bif365-gate__tab.is-active,
.bif365 .bif365-gate__tab.is-active:hover,
.bif365 .bif365-gate__tab.is-active:focus {
	background: #fff !important;
	color: var(--bif-heading) !important;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

.bif365-gate__pane[hidden] { display: none; }

.bif365-gate__pane input[type="email"] {
	width: 100%;
	padding: 13px 15px !important;
	border: 1.5px solid var(--bif-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--bif-heading) !important;
	font: inherit !important;
	font-size: 15.5px !important;
}

.bif365-gate__pane input[type="email"]:focus {
	border-color: var(--bif-primary) !important;
	outline: 3px solid var(--bif-primary-line);
	outline-offset: 1px;
}

.bif365-gate__pane label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--bif-heading);
}

.bif365 .bif365-gate__pane .bif365-btn--primary { width: 100%; }

.bif365-gate__notice {
	margin: 0 0 16px;
	padding: 11px 14px;
	border-radius: 12px;
	font-size: 14px;
}

/* Dark text on a light tint in both tones — never the other way round. */
.bif365-gate__notice--ok {
	background: #ecfdf3;
	border: 1px solid #abefc6;
	color: #05603a;
}

.bif365-gate__notice--error {
	background: #fef3f2;
	border: 1px solid #fecdca;
	color: #912018;
}

/* ── packages: platform tabs ──────────────────────────────── */

.bif365-pkg-tabs { margin-bottom: 16px; }
.bif365-pkg-pane[hidden] { display: none; }

.bif365-dash__hint {
	margin: -6px 0 14px;
	color: var(--bif-muted);
	font-size: 14px;
}

/* Track-order lookup errors: dark red on a light tint. */
.bif365-track__error {
	margin: 0 0 14px;
	padding: 11px 14px;
	border: 1px solid #fecdca;
	border-radius: 12px;
	background: #fef3f2;
	color: #912018;
	font-size: 14px;
}
