/* ===========================================================
	UpSized — design tokens
	Palette corrected to Up's actual current brand: their live
	theme-color is #ff705c (coral), paired with the yellow
	"sunnies" mascot face from the app icon/favicon. A fluoro
	lime marks money moving in — a functional color, not a
	brand one, kept for contrast against the warm palette.
   =========================================================== */

:root {
	--bg: #0a0a0c;
	--bg-elevated: #131316;
	--surface: #1a1a1e;
	--surface-2: #202024;
	--border: rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.16);

	--text: #f5f5f7;
	--text-dim: #a5a5ad;
	--text-faint: #6b6b73;

	--sunrise-start: #ffd84d;
	--sunrise-mid: #ff9a5c;
	--sunrise-end: #ff705c;
	--gradient-sunrise: linear-gradient(115deg, var(--sunrise-start), var(--sunrise-mid) 55%, var(--sunrise-end));

	--brand-yellow: #ffde59;
	--brand-coral: #ff705c;
	--home-loan-accent: #8fb8ff;
	--lime: #9cff3f;
	--danger: #fd5e5e;

	--radius-sm: 10px;
	--radius-md: 16px;
	--radius-lg: 24px;
	--radius-pill: 999px;

	--shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
	--shadow-pop: 0 20px 60px rgba(0, 0, 0, 0.5);

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

	font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
	height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
}

button, input {
	font-family: inherit;
	color: inherit;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------------- Ambient background ---------------- */

.ambient-orb {
	position: fixed;
	border-radius: 50%;
	filter: blur(90px);
	opacity: 0.35;
	pointer-events: none;
	z-index: 0;
	animation: drift 22s ease-in-out infinite;
}
.ambient-orb.orb-1 {
	/*width: 520px; height: 520px;*/
	width: 75%; height: 100%;
	background: var(--gradient-sunrise);
	opacity: 0.1;
	top: -160px; left: -120px;
}
.ambient-orb.orb-2 {
	/*width: 420px; height: 420px;*/
	width: 75%; height: 100%;
	background: radial-gradient(circle, var(--brand-yellow), transparent 70%);
	opacity: 0.1;
	bottom: -140px; right: -100px;
	animation-delay: -8s;
}

@keyframes drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(30px, -40px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
	.ambient-orb { animation: none; }
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Screens ---------------- */

.screen {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 1;
}
.screen.active { display: flex; }

/* ---------------- Onboarding / Lock shared shell ---------------- */

#screen-onboarding, #screen-lock {
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.auth-card {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 440px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 40px 36px;
	box-shadow: var(--shadow-pop);
	text-align: center;
	animation: cardIn 0.5s var(--ease-out) both;
}

@keyframes cardIn {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-mark {
	width: 56px; height: 56px;
	border-radius: 18px;
	background: var(--gradient-sunrise);
	display: flex; align-items: center; justify-content: center;
	font-size: 26px;
	margin: 0 auto 20px;
	box-shadow: 0 8px 24px rgba(255, 84, 112, 0.35);
	animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
	0%, 100% { box-shadow: 0 8px 24px rgba(255, 84, 112, 0.35); }
	50% { box-shadow: 0 8px 34px rgba(255, 84, 112, 0.55); }
}

.auth-card h1 { font-size: 22px; margin: 0 0 8px; letter-spacing: -0.02em; }
.auth-card p.sub { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 0 0 28px; }

.ob-step { display: none; }
.ob-step.active { display: block; animation: fadeUp 0.4s var(--ease-out) both; }

@keyframes fadeUp {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.btn {
	appearance: none;
	border: none;
	cursor: pointer;
	border-radius: var(--radius-pill);
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 700;
	width: 100%;
	transition: transform 0.15s var(--ease-spring), filter 0.15s;
	position: relative;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: default; pointer-events: none; }

.btn-primary {
	background: var(--gradient-sunrise);
	color: #140505;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-secondary {
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	color: var(--text);
}
.btn-secondary:hover { background: #26262b; }

.auth-block .btn + .btn { margin-top: 10px; }

.btn-danger {
	background: rgba(255, 92, 92, 0.12);
	color: var(--danger);
	border: 1px solid rgba(255, 92, 92, 0.3);
}

.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
	content: "";
	position: absolute; left: 50%; top: 50%;
	width: 18px; height: 18px;
	margin: -9px 0 0 -9px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field {
	width: 100%;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	font-size: 15px;
	margin-bottom: 14px;
	outline: none;
	transition: border-color 0.2s;
}
.field:focus { border-color: var(--brand-coral); }
.field::placeholder { color: var(--text-faint); }

.hint-link {
	display: inline-block;
	margin-top: 4px;
	margin-bottom: 18px;
	font-size: 13px;
	color: var(--text-dim);
	text-decoration: none;
	border-bottom: 1px dashed var(--text-faint);
}
.hint-link:hover { color: var(--text); }

.step-dots { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.step-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.step-dots span.active { background: var(--sunrise-mid); width: 18px; border-radius: 3px; transition: all 0.3s var(--ease-spring); }

#lock-error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

.link-btn {
	background: none; border: none; cursor: pointer;
	color: var(--text-dim);
	font-size: 13px;
	font-weight: 600;
	margin-top: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 4px;
}
.link-btn:hover { color: var(--text); }
.link-btn.danger-link { color: var(--text-faint); margin-top: 18px; }
.link-btn.danger-link:hover { color: var(--danger); }

.auth-block { display: none; }
.auth-block.is-active { display: block; animation: fadeUp 0.35s var(--ease-out) both; }

.warning-banner {
	text-align: left;
	background: rgba(255, 184, 76, 0.08);
	border: 1px solid rgba(255, 184, 76, 0.3);
	border-radius: var(--radius-md);
	padding: 12px 14px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #ffd8a3;
	margin-bottom: 14px;
}
.warning-banner strong { display: block; margin-bottom: 3px; color: #ffc978; }

.checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	text-align: left;
	font-size: 12.5px;
	color: var(--text-dim);
	line-height: 1.4;
	margin-bottom: 16px;
	cursor: pointer;
}
.checkbox-row input {
	margin-top: 2px;
	accent-color: var(--sunrise-mid);
	width: 16px; height: 16px;
	flex: none;
}

#lock-passkey-block, #lock-password-block { display: none; }
#lock-passkey-block.is-active, #lock-password-block.is-active { display: block; }

/* ---------------- App shell ---------------- */

#screen-app { flex-direction: column; }

.topbar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 24px;
	border-bottom: 1px solid var(--border);
	background: rgba(19, 19, 22, 0.7);
	backdrop-filter: blur(16px);
	z-index: 3;
}

.topbar-brand {
	display: flex; align-items: center; gap: 10px;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: -0.02em;
}
.topbar-brand .brand-dot {
	width: 28px; height: 28px; border-radius: 9px;
	background: var(--gradient-sunrise);
	display: flex; align-items: center; justify-content: center;
	font-size: 14px;
}

.topbar-spacer { flex: 1; }

.pill {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	padding: 7px 14px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text-dim);
	transition: all 0.3s;
}
.pill.is-low { color: var(--danger); border-color: rgba(255,92,92,0.4); background: rgba(255,92,92,0.08); }

#sync-indicator {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--text-faint);
}
#sync-indicator.is-active {
	background: var(--lime);
	box-shadow: 0 0 0 0 rgba(214, 255, 63, 0.6);
	animation: syncPing 1s ease-in-out infinite;
}
@keyframes syncPing {
	0% { box-shadow: 0 0 0 0 rgba(214, 255, 63, 0.5); }
	100% { box-shadow: 0 0 0 8px rgba(214, 255, 63, 0); }
}

#last-synced { font-size: 12px; color: var(--text-faint); }

.icon-btn {
	width: 38px; height: 38px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--surface-2);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	font-size: 16px;
	transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover { background: #26262b; transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.94); }

.app-version {
	position: fixed;
	top: 74px; /* clears the 66px-tall topbar on the main screen */
	right: 16px;
	z-index: 4;
	font-size: 11px;
	color: var(--text-faint);
	pointer-events: none;
}

.app-body {
	flex: 1;
	display: flex;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.main-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 20px 24px 0;
	overflow: hidden;
}

.split-balance-row {
	display: none;
	flex-wrap: wrap;
	align-items: baseline;
	row-gap: 8px;
	column-gap: 32px;
	margin-bottom: 18px;
}
.split-balance-row.has-data { display: flex; }
.split-balance-row .balance-group {
	display: flex;
	align-items: baseline;
	gap: 10px;
}
#twoup-balance-group { display: none; }
#twoup-balance-group.has-twoup { display: flex; }
.split-balance-row .label { color: var(--text-dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
#individual-balance { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
#twoup-balance { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }

.total-balance-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 18px;
}
.total-balance-row .label { color: var(--text-dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
#total-balance { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }

.acct-cards-row {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 14px;
	margin-bottom: 4px;
	padding-top: 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--border-strong) transparent;
}
.acct-cards-row::-webkit-scrollbar { height: 7px; }
.acct-cards-row::-webkit-scrollbar-track { background: transparent; }
.acct-cards-row::-webkit-scrollbar-thumb {
	background: var(--border-strong);
	border-radius: var(--radius-pill);
}
.acct-cards-row::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.home-loan-section { display: none; }
.home-loan-section.has-loans { display: block; }
.section-label-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 18px;
}
.section-label-row .label { color: var(--text-dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.section-label-row .num { font-size: 15px; font-weight: 700; color: var(--home-loan-accent); }

.acct-divider {
	flex: 0 0 auto;
	align-self: stretch;
	width: 1px;
	margin: 4px 2px;
	background: var(--text-faint);
}

.acct-card {
	flex: 0 0 auto;
	min-width: 180px;
	text-align: left;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 16px 18px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: border-color 0.2s, transform 0.15s;
}
.acct-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.acct-card.is-active {
	border-color: var(--sunrise-mid);
	box-shadow: 0 0 0 1px var(--sunrise-mid), 0 8px 24px rgba(255, 112, 92, 0.18);
}
.acct-name { font-size: 13px; color: var(--text-dim); }
.acct-balance { font-size: 19px; font-weight: 700; }
.acct-type-badge {
	align-self: flex-start;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: var(--radius-pill);
	background: var(--surface-2);
	color: var(--text-faint);
}
.acct-type-all { color: white; background: rgba(255, 255, 255, 0.12); }
.acct-type-saver { color: #b6ffb0; background: rgba(182,255,176,0.1); }
.acct-type-transactional { color: var(--brand-yellow); background: rgba(255,222,89,0.12); }
.acct-type-home_loan { color: var(--home-loan-accent); background: rgba(143,184,255,0.1); }
.acct-type-2up { color: var(--brand-coral); background: rgba(255,222,89,0.12); }

.acct-skeleton {
	min-width: 180px; height: 78px;
	background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
	background-size: 400% 100%;
	animation: shimmer 1.4s ease infinite;
	border: 1px solid var(--border);
}

.view-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

#txn-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0 24px;
}

.month-sep {
	position: sticky;
	top: -5px;
	z-index: 2;
	background: rgba(10, 10, 12, 0.85);
	backdrop-filter: blur(8px);
	padding: 10px 6px 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-faint);
	border-bottom: 1px solid var(--brand-coral);
}

.txn-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 6px;
	border-bottom: 1px solid var(--border);
	animation: rowIn 0.35s var(--ease-out) both;
	cursor: pointer;
	border-radius: var(--radius-sm);
	transition: background 0.15s;
}
.txn-row:hover { background: var(--surface); }
@keyframes rowIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.txn-row-new { animation: newRowFlash 1.2s ease-out; }
@keyframes newRowFlash {
	0% { background: rgba(214, 255, 63, 0.12); }
	100% { background: transparent; }
}

.txn-avatar {
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--surface-2);
	border: 1px solid var(--border);
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 700;
	color: var(--text-dim);
	flex: none;
}

.txn-main { flex: 1; min-width: 0; }
.txn-desc {
	font-size: 14.5px; font-weight: 600;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txn-meta {
	display: flex; align-items: center; gap: 6px;
	font-size: 12px; color: var(--text-faint);
	margin-top: 2px;
}
.txn-dot { opacity: 0.6; }
.txn-pill {
	font-size: 10px; font-weight: 700; text-transform: uppercase;
	padding: 2px 6px; border-radius: var(--radius-pill);
}
.txn-pill-held { background: rgba(255, 216, 138, 0.15); color: #ffd88a; }

.txn-amount {
	font-weight: 700; font-size: 14.5px;
	font-variant-numeric: tabular-nums;
	flex: none;
}
.txn-amount.is-positive { color: var(--lime); }
.txn-amount.is-negative { color: var(--danger); } /* was --text */

.txn-skeleton { animation: none; }
.skel-avatar, .skel-line, .skel-amount {
	background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
	background-size: 400% 100%;
	animation: shimmer 1.4s ease infinite;
	border-radius: 6px;
}
.skel-avatar { width: 38px; height: 38px; border-radius: 50%; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.skel-line { height: 10px; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-30 { width: 30%; }
.skel-amount { width: 60px; height: 14px; }

@keyframes shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

#scroll-sentinel {
	height: 40px;
	display: flex; align-items: center; justify-content: center;
	color: var(--text-faint);
	font-size: 12px;
	opacity: 0;
}
#scroll-sentinel.is-loading { opacity: 1; }
#scroll-sentinel.is-loading::before {
	content: ""; width: 14px; height: 14px;
	border-radius: 50%;
	border: 2px solid var(--border-strong);
	border-top-color: var(--sunrise-mid);
	animation: spin 0.7s linear infinite;
}

.empty-state {
	text-align: center;
	padding: 60px 20px;
	color: var(--text-dim);
}
.empty-emoji { font-size: 32px; margin-bottom: 10px; }
.empty-title { font-weight: 700; margin-bottom: 4px; }
.empty-sub { font-size: 13px; color: var(--text-faint); }

#txn-filter-empty { display: none; }
#txn-filter-empty.show { display: block; }

.txn-row-hidden { display: none; }

/* ---------------- Transaction search ---------------- */

.txn-toolbar { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.txn-search { display: flex; align-items: center; gap: 6px; }
.txn-search-input {
	width: 0;
	opacity: 0;
	padding: 0;
	border: none;
	background: var(--bg-elevated);
	border-radius: var(--radius-pill);
	font-size: 13px;
	color: var(--text);
	pointer-events: none;
	transition: width 0.25s var(--ease-out), opacity 0.2s, padding 0.25s;
}
.txn-search.is-open .txn-search-input {
	width: 200px;
	opacity: 1;
	padding: 9px 14px;
	border: 1px solid var(--border);
	pointer-events: auto;
}
.txn-search-input::placeholder { color: var(--text-faint); }
.txn-search-input:focus { border-color: var(--brand-coral); }
.txn-search-clear { display: none; }
.txn-search.is-open .txn-search-clear { display: flex; }

@media (max-width: 760px) {
	.txn-search.is-open .txn-search-input { width: 140px; }
}

/* ---------------- Settings modal ---------------- */

#settings-modal {
	position: fixed; inset: 0; z-index: 10;
	display: none;
	align-items: center; justify-content: center;
}
#settings-modal.open { display: flex; }
#settings-backdrop {
	position: absolute; inset: 0;
	background: rgba(0,0,0,0.6);
	backdrop-filter: blur(4px);
	animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
	position: relative;
	z-index: 1;
	width: 100%; max-width: 420px;
	max-height: 84vh;
	overflow-y: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 28px;
	animation: cardIn 0.3s var(--ease-out) both;
}

.modal-card h2 { margin: 0 0 20px; font-size: 18px; }
.modal-card .close-x {
	position: absolute; top: 18px; right: 18px;
	background: none; border: none; color: var(--text-dim);
	font-size: 20px; cursor: pointer;
}

.settings-group { margin-bottom: 22px; }
.settings-group label {
	display: block; font-size: 12.5px; font-weight: 700;
	color: var(--text-dim); text-transform: uppercase;
	letter-spacing: 0.03em; margin-bottom: 8px;
}
.settings-group select, .settings-group input[type="number"] {
	width: 100%;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
	font-size: 14px;
	color: var(--text);
}
.settings-row {
	display: flex; align-items: center; justify-content: space-between;
	font-size: 14px;
}
.settings-note { font-size: 12px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.divider { height: 1px; background: var(--border); margin: 22px 0; }

/* ---------------- Transaction detail modal ---------------- */

#txn-detail-modal {
	position: fixed; inset: 0; z-index: 10;
	display: none;
	align-items: center; justify-content: center;
}
#txn-detail-modal.open { display: flex; }
#txn-detail-backdrop {
	position: absolute; inset: 0;
	background: rgba(0,0,0,0.6);
	backdrop-filter: blur(4px);
	animation: fadeIn 0.2s;
}

.txn-detail-card { max-width: 440px; padding-top: 32px; }

.txn-detail-header {
	text-align: center;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 4px;
}
.txn-detail-avatar {
	width: 52px; height: 52px;
	border-radius: 50%;
	background: var(--surface-2);
	border: 1px solid var(--border);
	display: flex; align-items: center; justify-content: center;
	font-size: 16px; font-weight: 700;
	color: var(--text-dim);
	margin: 0 auto 12px;
}
.txn-detail-desc { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.txn-detail-amount {
	font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.txn-detail-amount.is-positive { color: var(--lime); }
.txn-detail-amount.is-negative { color: var(--danger); }

.txn-detail-rows { margin-top: 6px; }
.txn-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--border);
	font-size: 13.5px;
}
.txn-detail-row:last-child { border-bottom: none; }
.txn-detail-row .k { color: var(--text-dim); flex: 0 0 auto; }
.txn-detail-row .v {
	color: var(--text);
	text-align: right;
	font-weight: 600;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.txn-pill-settled { background: rgba(156, 255, 63, 0.12); color: var(--lime); }

.txn-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.txn-detail-tag {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	padding: 2px 10px;
	font-size: 11.5px;
	font-weight: 600;
}

.txn-detail-link {
	display: block;
	text-align: center;
	margin-top: 16px;
	font-size: 13px;
	color: var(--text-dim);
	text-decoration: none;
	border-bottom: 1px dashed var(--text-faint);
	padding-bottom: 2px;
}
.txn-detail-link:hover { color: var(--text); }

.txn-detail-id {
	font-family: ui-monospace, monospace;
	font-size: 10.5px;
	color: var(--text-faint);
	text-align: center;
	margin-top: 18px;
}

/* ---------------- Toasts ---------------- */

#toast-container {
	position: fixed; bottom: 24px; left: 50%;
	transform: translateX(-50%);
	display: flex; flex-direction: column; gap: 8px;
	z-index: 100;
	align-items: center;
}
.toast {
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	color: var(--text);
	padding: 12px 18px;
	border-radius: var(--radius-pill);
	font-size: 13.5px;
	font-weight: 600;
	box-shadow: var(--shadow-card);
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.3s var(--ease-spring);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-color: rgba(214, 255, 63, 0.4); }
.toast-error { border-color: rgba(255, 92, 92, 0.4); color: #ffb3b3; }

/* ---------------- Responsive ---------------- */

@media (max-width: 760px) {
	.topbar { padding: 12px 16px; }
	.topbar-brand span.brand-text { display: none; }
	.main-col { padding: 16px 16px 0; }
	#total-balance { font-size: 26px; }
	#individual-balance, #twoup-balance { font-size: 26px; }
	.acct-card { min-width: 150px; padding: 13px 14px; }
	.auth-card { padding: 30px 24px; }
	#last-synced { display: none; }
}
