/*
 * First Buy Core — owner dashboard app layout.
 *
 * Phone first: a top bar, a bottom bar with the main screens and a side
 * menu that slides in from the left. From 1024px wide the side menu stays
 * open on the left. Colours, fonts, buttons and inputs come from the theme
 * (assets/css/main.css), with fallbacks so the dashboard works on its own.
 */

.fbc-app-body {
	--fbc-side-w: 272px;
	--fbc-top-h: 60px;
	--fbc-bottom-h: 64px;
	--fbc-safe-b: env(safe-area-inset-bottom, 0px);
	--fbc-safe-t: env(safe-area-inset-top, 0px);
	--fbc-brown: var(--brown, #43260a);
	--fbc-yellow: var(--brand-yellow, #e9d919);
	--fbc-red: var(--red, #8a021c);
	--fbc-cream: var(--cream, #fdf8da);
	--fbc-card: var(--card, #fff);
	--fbc-muted: var(--muted, #f4ecc6);
	--fbc-muted-fg: var(--muted-foreground, #6a4f39);
	--fbc-border: var(--border, #e4d8ab);
	background: var(--fbc-cream);
	color: var(--fbc-brown);
	font-family: var(--font-sans, system-ui, sans-serif);
	-webkit-tap-highlight-color: transparent;
}
.fbc-app-body .fbf-wa-fab,
.fbc-app-body .fbf-cookie,
.fbc-app-body .fbc-announce { display: none !important; }
html.fbc-no-scroll { overflow: hidden; }

.fbc-ico { width: 1.375rem; height: 1.375rem; flex-shrink: 0; }
.fbf-btn .fbc-ico { width: 1.1em; height: 1.1em; }

/* ---------- Shell ---------- */
.fbc-app { min-height: 100vh; min-height: 100dvh; }
.fbc-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* Top bar */
.fbc-top {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	height: calc(var(--fbc-top-h) + var(--fbc-safe-t));
	padding: var(--fbc-safe-t) 0.75rem 0;
	background: var(--fbc-brown);
	color: var(--brown-foreground, #f1e344);
	box-shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.45);
}
.fbc-top__title {
	flex: 1;
	min-width: 0;
	font-family: var(--font-display, Georgia, serif);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #fff;
}
.fbc-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 0.875rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
	flex-shrink: 0;
}
.fbc-icon-btn:hover,
.fbc-icon-btn:focus-visible { background: rgba(255, 255, 255, 0.12); }
.fbc-icon-btn:focus-visible { outline: 3px solid var(--fbc-yellow); outline-offset: 1px; }

/* Side menu (drawer on phones and tablets) */
.fbc-side {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 50;
	width: min(86vw, var(--fbc-side-w));
	display: flex;
	flex-direction: column;
	background: var(--fbc-brown);
	color: #fff;
	padding: calc(0.75rem + var(--fbc-safe-t)) 0.75rem calc(0.75rem + var(--fbc-safe-b));
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(-105%);
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s;
	visibility: hidden;
}
.fbc-app.is-side-open .fbc-side {
	transform: none;
	visibility: visible;
	box-shadow: 12px 0 40px -10px rgba(0, 0, 0, 0.5);
}
.fbc-scrim {
	position: fixed;
	inset: 0;
	z-index: 45;
	background: rgba(30, 16, 4, 0.5);
	backdrop-filter: blur(2px);
	animation: fbc-fade 0.2s ease;
}
@keyframes fbc-fade { from { opacity: 0; } }

.fbc-side__brand { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.25rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.fbc-side__brand > span { flex: 1; min-width: 0; display: grid; }
.fbc-side__brand strong { font-family: var(--font-display, Georgia, serif); font-size: 1.0625rem; line-height: 1.2; }
.fbc-side__brand small { color: var(--fbc-yellow); font-size: 0.8125rem; }
.fbc-logo { width: 3rem; height: 3rem; border-radius: 0.875rem; flex-shrink: 0; }
.fbc-side__close { color: #fff; }

.fbc-side__nav { display: grid; gap: 0.125rem; padding: 0.5rem 0; }
.fbc-side__group { margin: 0.875rem 0.75rem 0.25rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.fbc-side__link {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	width: 100%;
	min-height: 3rem;
	padding: 0.5rem 0.875rem;
	border: 0;
	border-radius: 0.875rem;
	background: transparent;
	color: rgba(255, 255, 255, 0.92);
	font: inherit;
	font-weight: 600;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.fbc-side__link[hidden] { display: none; }
.fbc-side__link > span:not(.fbc-badge) { flex: 1; }
.fbc-side__link:hover { background: rgba(255, 255, 255, 0.08); }
.fbc-side__link:focus-visible { outline: 3px solid var(--fbc-yellow); outline-offset: -3px; }
.fbc-side__link.is-active { background: var(--fbc-yellow); color: var(--fbc-brown); }
.fbc-side__link.is-active .fbc-badge { background: var(--fbc-red); color: #fff; }
.fbc-side__foot { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.12); display: grid; gap: 0.125rem; }

.fbc-badge {
	display: inline-grid;
	place-items: center;
	min-width: 1.375rem;
	height: 1.375rem;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--fbc-red);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
}

/* Bottom bar (phones) */
.fbc-bottom {
	position: fixed;
	inset: auto 0 0;
	z-index: 40;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	height: calc(var(--fbc-bottom-h) + var(--fbc-safe-b));
	padding-bottom: var(--fbc-safe-b);
	background: var(--fbc-card);
	border-top: 1px solid var(--fbc-border);
	box-shadow: 0 -8px 24px -16px rgba(67, 38, 10, 0.5);
}
.fbc-bottom__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1875rem;
	border: 0;
	background: transparent;
	color: var(--fbc-muted-fg);
	font: inherit;
	font-size: 0.6875rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.fbc-bottom__link .fbc-ico { width: 1.5rem; height: 1.5rem; }
.fbc-bottom__link.is-active { color: var(--fbc-red); }
.fbc-bottom__link.is-active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--fbc-red); }
.fbc-bottom__link .fbc-badge { position: absolute; top: 0.375rem; left: calc(50% + 0.25rem); min-width: 1.125rem; height: 1.125rem; font-size: 0.625rem; }
.fbc-bottom__link:focus-visible { outline: 3px solid var(--fbc-red); outline-offset: -3px; }

/* Content area */
.fbc-app .fbc-dash-body {
	flex: 1;
	width: 100%;
	max-width: 72rem;
	margin: 0 auto;
	padding: 1rem 1rem calc(var(--fbc-bottom-h) + var(--fbc-safe-b) + 1.5rem);
	display: grid;
	align-content: start;
	gap: 1rem;
}
.fbc-app > .fbc-main > .fbc-dash-notice,
.fbc-new-order { margin: 1rem 1rem 0; }
.fbc-new-order[hidden] { display: none; }
.fbc-new-order a {
	display: block;
	border-radius: 1rem;
	padding: 0.875rem 1.125rem;
	background: var(--fbc-red);
	color: #fff;
	font-weight: 700;
	text-align: center;
	animation: fbc-pulse 1.6s ease-in-out 3;
}
@keyframes fbc-pulse { 50% { transform: scale(1.02); } }

@media (min-width: 1024px) {
	.fbc-app { display: grid; grid-template-columns: var(--fbc-side-w) minmax(0, 1fr); }
	.fbc-side {
		position: sticky;
		top: 0;
		height: 100vh;
		width: auto;
		transform: none;
		visibility: visible;
		transition: none;
	}
	.fbc-side__close,
	.fbc-top__menu,
	.fbc-scrim,
	.fbc-bottom { display: none !important; }
	.fbc-top { padding-left: 1.5rem; padding-right: 1.5rem; background: var(--fbc-cream); color: var(--fbc-brown); box-shadow: none; border-bottom: 1px solid var(--fbc-border); }
	.fbc-top__title { color: var(--fbc-brown); font-size: 1.5rem; }
	.fbc-top .fbc-icon-btn:hover { background: var(--fbc-muted); }
	.fbc-app .fbc-dash-body { padding: 1.5rem 1.5rem 3rem; gap: 1.25rem; }
	.fbc-app > .fbc-main > .fbc-dash-notice,
	.fbc-new-order { margin: 1.25rem 1.5rem 0; }
}

/* ---------- Touch-friendly components ---------- */
.fbc-app .fbc-input,
.fbc-app input[type="text"],
.fbc-app input[type="email"],
.fbc-app input[type="tel"],
.fbc-app input[type="number"],
.fbc-app input[type="search"],
.fbc-app input[type="date"],
.fbc-app input[type="time"],
.fbc-app select,
.fbc-app textarea { font-size: 1rem; min-height: 2.875rem; }
.fbc-app textarea.fbc-input { min-height: 0; }
.fbc-app input[type="checkbox"],
.fbc-app input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--fbc-red); flex-shrink: 0; }
.fbc-app .fbf-btn { min-height: 2.75rem; }
.fbc-app .fbf-btn--sm { min-height: 2.5rem; }
.fbc-app .fbf-btn.is-busy { opacity: 0.6; cursor: progress; }
.fbc-app .fbf-btn.is-busy::after { content: "…"; }
.fbc-app .fbf-btn:hover { transform: none; }
.fbc-app .fbc-dash-help { line-height: 1.45; }
.fbc-app .fbc-dash-back { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; text-decoration: none; }
.fbc-app .fbc-dash-back:hover { text-decoration: underline; }
.fbc-app .fbc-dash-h2 { font-family: var(--font-display, Georgia, serif); }
.fbc-app .fbc-dash-card { border-radius: 1.25rem; }

/* Stats */
.fbc-app .fbc-dash-stats { grid-template-columns: repeat(auto-fit, minmax(6.25rem, 1fr)); gap: 0.5rem; }
.fbc-app .fbc-dash-stats--4 { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.fbc-app .fbc-dash-stat { padding: 0.75rem; border-radius: 1rem; min-width: 0; }
.fbc-app .fbc-dash-stat__value { font-size: clamp(1rem, 4.6vw, 1.5rem); overflow-wrap: anywhere; }
@media (min-width: 768px) {
	.fbc-app .fbc-dash-stat__value { font-size: 1.875rem; }
}
.fbc-app .fbc-dash-attention a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Toolbars: filters scroll sideways, search full width on phones */
.fbc-app .fbc-dash-toolbar { align-items: stretch; }
.fbc-app .fbc-dash-toolbar > .fbf-btn { flex: 1 0 auto; }
.fbc-app .fbc-dash-chips {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	margin: 0 -1rem;
	padding: 0.25rem 1rem 0.5rem;
	width: calc(100% + 2rem);
}
.fbc-app .fbc-dash-chips::-webkit-scrollbar { display: none; }
.fbc-app .fbc-dash-chip { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 2.5rem; white-space: nowrap; }
.fbc-app .fbc-dash-search { flex: 1 1 100%; max-width: none; flex-wrap: nowrap; }
@media (min-width: 768px) {
	.fbc-app .fbc-dash-toolbar > .fbf-btn { flex: 0 0 auto; }
	.fbc-app .fbc-dash-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; width: auto; }
	.fbc-app .fbc-dash-search { flex: 1 1 260px; max-width: 420px; }
}

/* List rows (orders, requests, customers, pages) */
.fbc-app .fbc-dash-row { align-items: center; background: var(--fbc-card); box-shadow: 0 1px 0 var(--fbc-border); padding: 0.875rem; gap: 0.625rem; }
.fbc-app .fbc-dash-card .fbc-dash-row { background: var(--fbc-cream); box-shadow: none; }
.fbc-app .fbc-dash-row__main { flex: 1; }
.fbc-app .fbc-dash-row__main strong { overflow-wrap: anywhere; }
.fbc-dash-row__go {
	display: inline-flex;
	align-items: center;
	gap: 0.125rem;
	flex-shrink: 0;
	border-radius: 999px;
	padding: 0.375rem 0.5rem 0.375rem 0.75rem;
	background: var(--fbc-muted);
	color: var(--fbc-brown);
	font-size: 0.8125rem;
	font-weight: 700;
}
.fbc-dash-row__go .fbc-ico { width: 1rem; height: 1rem; }
.fbc-dash-row:hover .fbc-dash-row__go { background: var(--fbc-brown); color: #fff; }
@media (max-width: 479.98px) {
	.fbc-app .fbc-dash-row { flex-wrap: wrap; }
	.fbc-app .fbc-dash-row__main { flex: 1 1 100%; }
	.fbc-app .fbc-dash-row__side { justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; gap: 0.5rem; }
	.fbc-dash-row__go { margin-left: auto; }
}

/* Dish / coupon rows with buttons */
.fbc-app .fbc-dash-dish { background: var(--fbc-card); box-shadow: 0 1px 0 var(--fbc-border); padding: 0.75rem; }
.fbc-app .fbc-dash-card .fbc-dash-dish { background: var(--fbc-cream); box-shadow: none; }
.fbc-app .fbc-dash-dish__main strong { overflow-wrap: anywhere; }
.fbc-app .fbc-dash-dish__actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.fbc-app .fbc-dash-dish__actions > .fbf-btn--red:first-child { grid-column: 1 / -1; }
.fbc-app .fbc-dash-dish__actions form,
.fbc-app .fbc-dash-dish__actions .fbf-btn { display: flex; width: 100%; }
.fbc-app .fbc-dash-dish__actions .fbf-btn { justify-content: center; }
@media (min-width: 768px) {
	.fbc-app .fbc-dash-dish__actions { width: auto; display: flex; flex-wrap: wrap; }
	.fbc-app .fbc-dash-dish__actions form,
	.fbc-app .fbc-dash-dish__actions .fbf-btn { width: auto; }
}

/* Order screen */
.fbc-app .fbc-dash-order-head .fbc-dash-print { margin-left: auto; }
.fbc-app .fbc-dash-actions .fbf-btn { flex: 1 1 auto; }
@media (min-width: 768px) {
	.fbc-app .fbc-dash-actions .fbf-btn { flex: 0 0 auto; }
}
.fbc-app .fbc-dash-inline { display: contents; }

/* Forms */
.fbc-app .fbc-dash-form-grid { gap: 1rem 1.25rem; }
.fbc-app .fbc-dash-field--check label { min-height: 2.75rem; align-items: center; }
.fbc-app .fbc-dash-field--check input { margin-top: 0; }
.fbc-app .fbc-dash-checks label { min-height: 2.5rem; }
.fbc-app .fbc-dash-photo { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.fbc-app .fbc-dash-photo .fbc-dash-thumb { width: 5.5rem; height: 5.5rem; }
.fbc-app input[type="file"].fbc-input { padding: 0.5rem; font-size: 0.875rem; }

.fbc-dash-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.75rem; }
.fbc-dash-gallery__item { display: grid; gap: 0.25rem; font-size: 0.8125rem; font-weight: 600; }
.fbc-dash-gallery__item .fbc-dash-thumb { width: 100%; height: auto; aspect-ratio: 1; }
.fbc-dash-gallery__item label { display: flex; align-items: center; gap: 0.375rem; min-height: 2rem; }

.fbc-dash-options { display: grid; gap: 0.75rem; }
.fbc-dash-option { display: grid; gap: 0.625rem; border-radius: 1rem; background: var(--fbc-cream); padding: 0.875rem; }
.fbc-dash-option label > span { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.25rem; }
.fbc-dash-option__checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.fbc-dash-option__checks label { display: flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; font-weight: 600; font-size: 0.9375rem; }
.fbc-dash-option__remove { color: var(--fbc-red); }
.fbc-dash-option--new { background: transparent; border: 2px dashed var(--fbc-border); }
.fbc-dash-option--new summary,
.fbc-dash-more summary,
.fbc-dash-removed summary { display: flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; font-weight: 700; cursor: pointer; list-style: none; }
.fbc-dash-option--new summary::-webkit-details-marker,
.fbc-dash-more summary::-webkit-details-marker,
.fbc-dash-removed summary::-webkit-details-marker { display: none; }
.fbc-dash-more summary,
.fbc-dash-removed summary { text-decoration: underline; }
.fbc-dash-more[open] summary { margin-bottom: 0.5rem; }
.fbc-dash-removed[open] summary { margin-bottom: 0.25rem; }
.fbc-dash-option__new { display: grid; gap: 0.625rem; padding-top: 0.75rem; }
@media (min-width: 600px) {
	.fbc-dash-option { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
	.fbc-dash-option__checks { grid-column: 1 / -1; }
	.fbc-dash-option--new { display: block; }
	.fbc-dash-option__new { grid-template-columns: 2fr 1fr; }
}

/* Nothing may push the screen wider than the phone */
.fbc-app .fbc-dash-body > *,
.fbc-app .fbc-dash-card,
.fbc-app .fbc-dash-field,
.fbc-app .fbc-dash-form-grid > *,
.fbc-app .fbc-dash-photo > div { min-width: 0; }
.fbc-app .fbc-input,
.fbc-app select,
.fbc-app textarea { max-width: 100%; min-width: 0; }
.fbc-app select.fbc-input { text-overflow: ellipsis; }
.fbc-app input[type="date"],
.fbc-app input[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; }
.fbc-app input[type="file"] { max-width: 100%; }
.fbc-app .fbc-dash-table { table-layout: fixed; border-collapse: collapse; }
.fbc-app .fbc-dash-table td,
.fbc-app .fbc-dash-table th { overflow-wrap: anywhere; }
.fbc-app .fbc-dash-table th:not(:first-child),
.fbc-app .fbc-dash-table td:not(:first-child) { width: 26%; text-align: right; }
.fbc-app .fbc-dash-table tbody tr + tr td { border-top: 1px solid var(--fbc-border); }
.fbc-app .fbc-dash-table td { padding: 0.5rem 0.25rem; }
.fbc-app .fbc-dash-dl { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
.fbc-app .fbc-dash-items li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.fbc-app .fbc-dash-section-form .fbf-btn { flex: 0 0 auto; }
.fbc-app .fbc-dash-dish > .fbc-dash-section-form { flex: 1 1 100%; }
.fbc-app .fbc-dash-code { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

/* Reports: date range */
.fbc-dash-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; width: 100%; align-items: end; }
.fbc-dash-range label > span { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.25rem; }
.fbc-dash-range .fbf-btn { grid-column: 1 / -1; }
@media (min-width: 600px) {
	.fbc-dash-range { grid-template-columns: 1fr 1fr auto; width: auto; flex: 1 1 420px; max-width: 520px; }
	.fbc-dash-range .fbf-btn { grid-column: auto; }
}

/* Overview quick actions */
.fbc-dash-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.fbc-dash-quick__btn {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 3.5rem;
	padding: 0.625rem 0.875rem;
	border-radius: 1rem;
	background: var(--fbc-card);
	box-shadow: 0 1px 0 var(--fbc-border);
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1.2;
	text-decoration: none;
}
.fbc-dash-quick__btn .fbc-ico { color: var(--fbc-red); }
.fbc-dash-quick__btn--main { grid-column: 1 / -1; background: var(--fbc-red); color: #fff; justify-content: center; font-size: 1.0625rem; }
.fbc-dash-quick__btn--main .fbc-ico { color: #fff; }
@media (min-width: 768px) {
	.fbc-dash-quick { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
	.fbc-dash-quick__btn--main { grid-column: auto; }
}

/* Record a sale */
.fbc-dash-choice { display: grid; gap: 0.5rem; }
.fbc-dash-choice__opt { display: flex; gap: 0.75rem; align-items: flex-start; border: 2px solid var(--fbc-border); border-radius: 1rem; padding: 0.875rem; cursor: pointer; background: var(--fbc-cream); }
.fbc-dash-choice__opt input { margin-top: 0.125rem; }
.fbc-dash-choice__opt span { display: grid; gap: 0.125rem; }
.fbc-dash-choice__opt small { color: var(--fbc-muted-fg); font-size: 0.875rem; line-height: 1.4; }
.fbc-dash-choice__opt:has(input:checked) { border-color: var(--fbc-red); background: var(--fbc-card); }
@media (min-width: 600px) {
	.fbc-dash-choice { grid-template-columns: 1fr 1fr; }
}
.fbc-dash-lines { display: grid; gap: 0.625rem; }
.fbc-dash-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; border-radius: 1rem; background: var(--fbc-cream); padding: 0.75rem; }
.fbc-dash-line[hidden] { display: none; }
.fbc-dash-line label > span { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.25rem; }
.fbc-dash-line__dish { grid-column: 1 / -1; }
@media (min-width: 768px) {
	.fbc-dash-line { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.2fr); }
	.fbc-dash-line__dish { grid-column: auto; }
}
.fbc-dash-addline { margin: 0.75rem 0; }
.fbc-dash-addline[hidden] { display: none; }
.fbc-dash-total { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--fbc-border); font-size: 1.0625rem; text-align: right; }
.fbc-dash-total strong { font-family: var(--font-display, Georgia, serif); font-size: 1.375rem; }
.fbc-dash-sale [data-fbc-later-only][hidden] { display: none; }

/* Delete / draft */
.fbf-btn--danger { background: #fff; color: var(--fbc-red); border: 2px solid var(--fbc-red); padding: calc(0.8rem - 2px) calc(1.4rem - 2px); }
.fbf-btn--danger.fbf-btn--sm { padding: calc(0.5rem - 2px) calc(1rem - 2px); }
.fbf-btn--danger:hover { background: var(--fbc-red); color: #fff; }
.fbc-dash-danger-zone { border: 2px dashed rgba(138, 2, 28, 0.35); background: transparent; box-shadow: none; }
.fbc-dash-danger-zone .fbc-dash-actions { margin-top: 0.75rem; }
.fbc-dash-empty-bin { margin-top: 0.75rem; }
.fbc-app .fbc-dash-link-danger { border: 0; background: none; padding: 0.5rem 0; min-height: 2.75rem; cursor: pointer; font: inherit; font-weight: 700; color: var(--fbc-red); text-decoration: underline; }
.fbc-dash-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--fbc-muted-fg); }

/* Orders: select several */
.fbc-dash-selectbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.fbc-dash-selectbar__form { display: none; flex-wrap: wrap; align-items: center; gap: 0.5rem; width: 100%; }
.fbc-dash-selectbar.is-selecting > [data-fbc-select-toggle] { display: none; }
.fbc-dash-selectbar.is-selecting .fbc-dash-selectbar__form { display: flex; }
.fbc-dash-selectbar__count { font-weight: 700; margin-right: auto; }
.fbc-dash-selrow { display: flex; align-items: stretch; gap: 0.5rem; }
.fbc-dash-selrow > .fbc-dash-row { flex: 1; min-width: 0; }
.fbc-dash-selbox { display: none; align-items: center; justify-content: center; width: 2.75rem; flex-shrink: 0; border-radius: 1rem; background: var(--fbc-card); cursor: pointer; }
.is-selecting .fbc-dash-selbox { display: flex; }
.is-selecting .fbc-dash-row__go { display: none; }
.fbc-dash-selrow.is-picked .fbc-dash-row { outline: 2px solid var(--fbc-red); outline-offset: -2px; }

/* Save bar: pinned above the bottom bar on phones */
.fbc-app .fbc-dash-sticky-save {
	position: sticky;
	bottom: calc(var(--fbc-bottom-h) + var(--fbc-safe-b) + 0.5rem);
	z-index: 20;
	width: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.625rem;
	border-radius: 1.25rem;
	background: var(--fbc-card);
	box-shadow: 0 10px 30px -10px rgba(67, 38, 10, 0.45);
}
.fbc-app .fbc-dash-sticky-save .fbf-btn { flex: 1 1 auto; }
@media (min-width: 1024px) {
	.fbc-app .fbc-dash-sticky-save { bottom: 1rem; width: fit-content; border-radius: 999px; }
	.fbc-app .fbc-dash-sticky-save .fbf-btn { flex: 0 0 auto; }
}

/* Install instructions (iPhone) */
.fbc-install-help { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; padding: 1rem; background: rgba(30, 16, 4, 0.55); }
.fbc-install-help[hidden] { display: none; }
.fbc-install-help__box { width: min(100%, 26rem); display: grid; gap: 0.75rem; border-radius: 1.5rem; background: var(--fbc-card); padding: 1.25rem 1.25rem calc(1.25rem + var(--fbc-safe-b)); }
.fbc-install-help__box ol { display: grid; gap: 0.5rem; padding-left: 1.25rem; list-style: decimal; }
@media (min-width: 600px) {
	.fbc-install-help { align-items: center; }
}

/* Login */
.fbc-app-body .fbc-dash--login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.fbc-app-body .fbc-dash-login { width: min(100%, 26rem); margin: 0; text-align: left; }
.fbc-app-body .fbc-dash-login .fbc-logo { width: 4.5rem; height: 4.5rem; border-radius: 1.25rem; }
.fbc-app-body .fbc-dash-login input[type="text"],
.fbc-app-body .fbc-dash-login input[type="password"] { width: 100%; font-size: 1rem; min-height: 3rem; }
.fbc-app-body .fbc-dash-login input[type="submit"] { width: 100%; min-height: 3rem; font-size: 1rem; }
.fbc-app-body .fbc-dash:not(.fbc-dash--login) { padding: 1rem; }

/* ---------- Print (order ticket) ---------- */
@media print {
	.fbc-side,
	.fbc-scrim,
	.fbc-top,
	.fbc-bottom,
	.fbc-new-order,
	.fbc-dash-notice,
	.fbc-dash-back,
	.fbc-dash-actions,
	.fbc-dash-print,
	.fbc-dash-form,
	.fbc-install-help { display: none !important; }
	.fbc-app { display: block; }
	.fbc-app .fbc-dash-body { padding: 0; max-width: none; }
	.fbc-app-body { background: #fff; }
	.fbc-app .fbc-dash-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
	.fbc-dash-card--yellow { background: #fff !important; }
}

@media (prefers-reduced-motion: reduce) {
	.fbc-side,
	.fbc-scrim,
	.fbc-new-order a { transition: none; animation: none; }
}
