/* ---------- hero (mirrors .pb-market-hero, keys color scheme) ---------- */
.pb-keys-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-bottom: 18px;
	padding: 32px 32px 28px;
	border: 1px solid rgba(255, 255, 255, .07);
	border-radius: 18px;
	background: linear-gradient(1deg, #25252e 30%, #292932 100%);
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .55);
}

.pb-keys-hero__watermark {
	position: absolute;
	z-index: 0;
	bottom: -22px;
	right: -8px;
	font-size: 150px;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, .045);
	letter-spacing: -.04em;
	text-transform: uppercase;
	pointer-events: none;
	user-select: none;
}

.pb-keys-hero__top {
	position: relative;
	z-index: 1;
}

.pb-keys-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #9ca0b8;
}

.pb-keys-hero__eyebrow-rule {
	width: 22px;
	height: 1px;
	flex-shrink: 0;
	background: rgba(240, 180, 41, .4);
}

.pb-keys-hero__main {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.pb-keys-hero__text {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pb-keys-hero__title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.5px;
	color: #fff;
}

.pb-keys-hero__title em {
	font-style: normal;
	color: #f0b429;
}

.pb-keys-hero__desc {
	margin: 0;
	max-width: 520px;
	font-size: 14px;
	line-height: 1.6;
	color: #9ca0b8;
}

.pb-keys-hero__balance {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex-shrink: 0;
	padding: 16px 22px;
	border-radius: 16px;
	background: rgba(240, 180, 41, .1);
	border: 1px solid rgba(240, 180, 41, .22);
}

.pb-keys-hero__balance-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #f0d99c;
}

.pb-keys-hero__balance-value {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 28px;
	font-weight: 900;
	color: #f0b429;
	font-variant-numeric: tabular-nums;
}

.pb-keys-hero__balance-value i {
	font-size: 24px;
}

.keys-hero-ways {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.keys-hero-way {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border-radius: 11px;
	background: rgba(240, 180, 41, .1);
	border: 1px solid rgba(240, 180, 41, .18);
	color: #f0d99c;
	font-size: 12.5px;
	font-weight: 700;
}

.keys-hero-way__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f0b429;
	font-size: 15px;
}

.pb-keys-hero__stats {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .07);
}

.pb-keys-hero__stat {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .07);
}

.pb-keys-hero__stat i {
	font-size: 19px;
	color: #f0b429;
}

.pb-keys-hero__stat div {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.pb-keys-hero__stat-value {
	font-size: 15px;
	font-weight: 800;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.pb-keys-hero__stat-label {
	font-size: 11px;
	font-weight: 600;
	color: #9ca0b8;
}

@media (max-width: 768px) {
	.pb-keys-hero {
		padding: 22px 20px;
		gap: 14px;
	}

	.pb-keys-hero__title {
		font-size: 22px;
	}

	.pb-keys-hero__desc {
		font-size: 13px;
	}

	.pb-keys-hero__watermark {
		font-size: 96px;
		bottom: -14px;
		right: -6px;
	}

	.pb-keys-hero__main {
		align-items: stretch;
	}

	.pb-keys-hero__balance {
		align-items: flex-start;
		width: 100%;
	}
}

/* legacy alias kept for the balance value selector used by keysRefreshBalance() */
.keys-balance-card__value {
	font-variant-numeric: tabular-nums;
}

.keys-card {
	margin-bottom: 20px;
	background: linear-gradient(1deg, #25252e 30%, #292932 100%);
	border: 1px solid rgba(255, 255, 255, .07);
	border-radius: 18px;
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .55);
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.keys-card:hover {
	border-color: rgba(255, 255, 255, .12);
	box-shadow: 0 16px 38px -16px rgba(0, 0, 0, .6);
}

.keys-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
	font-size: 14px;
	font-weight: 800;
	color: #f0f1f8;
}

.keys-card__head i {
	font-size: 17px;
	color: #f0b429;
}

.keys-card__badge {
	margin-left: auto;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(240, 180, 41, .14);
	color: #f0b429;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.keys-card__body {
	padding: 20px;
}

.keys-tasks-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 30px 20px;
	text-align: center;
}

.keys-tasks-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: rgba(240, 180, 41, .1);
	color: #f0b429;
	font-size: 22px;
}

.keys-tasks-empty__text {
	font-size: 13px;
	color: #8a8c9e;
	max-width: 320px;
}

.keys-history {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.keys-history-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .03);
	border: 1px solid transparent;
	transition: background .16s ease, border-color .16s ease, transform .16s ease;
	animation: keys-history-row-in .3s ease both;
}

.keys-history-row:hover {
	background: rgba(255, 255, 255, .055);
	border-color: rgba(255, 255, 255, .07);
	transform: translateX(2px);
}

@keyframes keys-history-row-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.keys-history-row__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 10px;
	font-size: 16px;
}

.keys-history-row__icon--in {
	background: rgba(79, 234, 159, .12);
	color: #4fea9f;
}

.keys-history-row__icon--out {
	background: rgba(240, 180, 41, .12);
	color: #f0b429;
}

.keys-history-row__body {
	flex: 1;
	min-width: 0;
}

.keys-history-row__comment {
	font-size: 13px;
	font-weight: 700;
	color: #f0f1f8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.keys-history-row__date {
	font-size: 11.5px;
	color: #8a8c9e;
}

.keys-history-row__amount {
	flex-shrink: 0;
	font-size: 15px;
	font-weight: 800;
}

.keys-history-row__amount--in {
	color: #4fea9f;
}

.keys-history-row__amount--out {
	color: #f0b429;
}

.keys-empty {
	padding: 30px 20px;
	text-align: center;
	font-size: 13px;
	color: #8a8c9e;
}

.keys-history-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 14px;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 12px;
	background: rgba(255, 255, 255, .03);
	color: #c9cde2;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.keys-history-more:hover {
	background: rgba(240, 180, 41, .1);
	border-color: rgba(240, 180, 41, .3);
	color: #f0b429;
}

.keys-history-more:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.keys-history-more i {
	font-size: 15px;
	transition: transform .18s ease;
}

.keys-history-more:hover i {
	transform: translateY(2px);
}

.keys-spend-grid {
	display: flex;
	gap: 14px;
}

.keys-spend-tile {
	flex: 1 1 0;
	min-width: 0;
	text-decoration: none;
	cursor: pointer;
}

.keys-spend-tile:hover {
	text-decoration: none;
}

.keys-spend-tile .keys-task-tile__icon {
	background: rgba(79, 234, 159, .12);
	color: #4fea9f;
}

.keys-spend-tile__label {
	font-size: 13.5px;
	font-weight: 800;
	color: #f0f1f8;
}

.keys-alert {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: rgba(240, 180, 41, .1);
	border: 1px solid rgba(240, 180, 41, .22);
	color: #f0d99c;
}

.keys-alert__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 20px;
	color: #f0b429;
}

.keys-alert__text {
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.4;
}

.keys-alert__text a {
	color: inherit;
	text-decoration: underline;
}

.keys-alert--ok {
	background: rgba(79, 234, 159, .1);
	border-color: rgba(79, 234, 159, .22);
	color: #b7f2d3;
}

.keys-alert--ok .keys-alert__icon {
	color: #4fea9f;
}

.keys-alert--warn {
	background: rgba(240, 180, 41, .1);
	border-color: rgba(240, 180, 41, .22);
	color: #f0d99c;
}

.keys-alert--warn .keys-alert__icon {
	color: #f0b429;
}

.keys-alert--gift {
	background: rgba(122, 141, 255, .1);
	border-color: rgba(122, 141, 255, .24);
	color: #c7cfff;
}

.keys-alert--gift .keys-alert__icon {
	color: #8b9bff;
}

@media (max-width: 767.98px) {
	.keys-spend-grid {
		flex-wrap: wrap;
	}

	.keys-spend-tile {
		flex: 1 1 calc(50% - 7px);
	}
}

