/* BetUnion 設計系統 · 覆蓋 Matrix 搬移頁的 indigo 色系 */

body.bu-app {
	background: radial-gradient(ellipse 120% 80% at 50% -20%, #064e3b 0%, #0f172a 45%, #020617 100%);
	min-height: 100vh;
	overflow-x: hidden;
}

/* 舊頁仍用 indigo class → 映射為 BetUnion emerald */
.bg-indigo-600 {
	background-color: rgb(5 150 105) !important;
}
.hover\:bg-indigo-500:hover {
	background-color: rgb(16 185 129) !important;
}
.bg-indigo-600\/20 {
	background-color: rgb(5 150 105 / 0.2) !important;
}
.bg-indigo-600\/30 {
	background-color: rgb(5 150 105 / 0.3) !important;
}
.text-indigo-300,
.text-indigo-200 {
	color: rgb(110 231 183) !important;
}
.text-indigo-400 {
	color: rgb(52 211 153) !important;
}
.border-indigo-500\/30,
.border-indigo-500\/40 {
	border-color: rgb(16 185 129 / 0.35) !important;
}
.ring-indigo-500 {
	--tw-ring-color: rgb(16 185 129) !important;
}
.focus\:border-indigo-500:focus {
	border-color: rgb(16 185 129) !important;
}
.focus\:ring-indigo-500:focus {
	--tw-ring-color: rgb(16 185 129) !important;
}
.shadow-indigo-900\/30 {
	--tw-shadow-color: rgb(6 78 59 / 0.3) !important;
}

.bu-card {
	border-radius: 0.75rem;
	border: 1px solid rgb(51 65 85 / 0.8);
	background: rgb(15 23 42 / 0.65);
	backdrop-filter: blur(8px);
}

.bu-card:hover {
	border-color: rgb(16 185 129 / 0.35);
}

#sidebarBrand .bu-logo-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	background: linear-gradient(135deg, #10b981, #059669);
	font-size: 0.75rem;
	font-weight: 800;
	color: #fff;
}

/* 手機底欄導覽 */
/* z-60：低於共用 Modal overlay（ui_helpers z-[70]），避免遮住 bottom sheet 操作鈕 */
.bu-bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 60;
	display: flex;
	align-items: stretch;
	justify-content: space-around;
	gap: 0.25rem;
	padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgb(51 65 85 / 0.9);
	background: rgb(2 6 23 / 0.92);
	backdrop-filter: blur(12px);
}

.bu-bottom-nav__item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
	min-height: 3rem;
	padding: 0.25rem 0.15rem;
	border-radius: 0.5rem;
	color: rgb(148 163 184);
	text-decoration: none;
	font-size: 0.65rem;
	line-height: 1.1;
}

.bu-bottom-nav__item.is-active {
	color: rgb(167 243 208);
	background: rgb(16 185 129 / 0.12);
}

.bu-bottom-nav__icon {
	font-size: 1rem;
	line-height: 1;
}

.bu-bottom-nav__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.has-bu-bottom-nav {
	padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

/* Modal 開啟時隱藏底欄，避免蓋住 bottom sheet 操作鈕 */
body.bu-modal-open .bu-bottom-nav {
	visibility: hidden;
	pointer-events: none;
}

/* 寬 Modal：手機 bottom sheet + safe-area；overflow 鎖住以免 footer 被裁出可視區 */
.bu-wide-modal {
	width: 100%;
	max-width: 56rem;
	max-height: 92vh;
	max-height: 92dvh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 1rem 1rem 0 0;
	border: 1px solid rgb(51 65 85);
	background: rgb(30 41 59);
	box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
	padding-top: env(safe-area-inset-top, 0px);
}
.bu-wide-modal__body {
	min-height: 0;
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.bu-wide-modal__footer {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.75rem;
	border-top: 1px solid rgb(51 65 85);
	background: rgb(30 41 59);
	padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 640px) {
	.bu-wide-modal {
		max-height: 90vh;
		max-height: 90dvh;
		border-radius: 0.75rem;
		padding-top: 0;
	}
}

@media (min-width: 1024px) {
	.bu-bottom-nav {
		display: none !important;
	}
	body.has-bu-bottom-nav {
		padding-bottom: 0;
	}
}

/* 大額金額：等寬 + tabular；卡片內單列為主，必要時可換行但不碎字 */
.bu-money {
	font-variant-numeric: tabular-nums;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	letter-spacing: -0.01em;
	line-height: 1.3;
	overflow-wrap: break-word;
}
.report-table-wrap {
	max-width: 100%;
}
