.ecm-buy-credits,
.ecm-account-wallet,
.ecm-account-topup {
	max-width: 900px;
	margin: 2rem auto;
	font-family: inherit;
}

.ecm-balance-card {
	background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
	color: #fff;
	border-radius: 12px;
	padding: 1.5rem 2rem;
	margin-bottom: 2rem;
	text-align: center;
}

.ecm-balance-card--compact {
	padding: 1rem 1.5rem;
}

.ecm-balance-card h2 {
	margin: 0 0 0.5rem;
	color: #fff;
}

.ecm-balance-amount {
	font-size: 1.25rem;
	margin: 0.5rem 0;
}

.ecm-balance-amount strong {
	font-size: 1.75rem;
}

.ecm-balance-link a,
.ecm-rate-line {
	color: #b8d4f0;
}

.ecm-calculator-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.ecm-calc-row {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.ecm-calc-row label {
	font-weight: 600;
}

.ecm-calc-input {
	max-width: 220px;
	padding: 0.5rem 0.75rem;
	font-size: 1.1rem;
}

.ecm-calc-arrow {
	text-align: center;
	color: #64748b;
	margin: 0.25rem 0 0.75rem;
	font-size: 1.25rem;
}

.ecm-calc-symbol {
	margin-right: 0.5rem;
	font-weight: 700;
	color: #1a3a5c;
}

.ecm-topup-submit {
	margin-top: 1rem;
}

.ecm-packages {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.ecm-package-form {
	margin: 0;
}

.ecm-package-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1.5rem 1rem;
	border: 2px solid #e3e5eb;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
	width: 100%;
	cursor: pointer;
}

.ecm-package-card--button {
	font: inherit;
}

.ecm-package-card:hover {
	border-color: #2d6a9f;
	box-shadow: 0 4px 16px rgba(45, 106, 159, 0.15);
}

.ecm-package-ec {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a3a5c;
}

.ecm-package-egp {
	color: #666;
}

.ecm-package-btn {
	margin-top: 0.5rem;
	background: #2d6a9f;
	color: #fff;
	padding: 0.4rem 1.2rem;
	border-radius: 6px;
	font-size: 0.9rem;
}

.ecm-buy-note {
	color: #666;
	font-size: 0.9rem;
	text-align: center;
}

.ecm-cart-notice {
	margin-bottom: 1rem;
}

.ecm-notice {
	padding: 1rem;
	background: #fff3cd;
	border-radius: 8px;
	text-align: center;
}

.ecm-dual-price .ecm-ec-price-line {
	display: block;
	font-size: 0.95em;
	color: #2d6a9f;
	font-weight: 600;
	margin-top: 0.25rem;
}

.ecm-single-ec-line {
	color: #2d6a9f;
	font-weight: 600;
}

.ecm-rate-hint {
	font-size: 0.9em;
	color: #64748b;
}

.ecm-tutor-wallet-banner {
	background: #eef6ff;
	border: 1px solid #c7ddf5;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	margin-bottom: 1.5rem;
}

.ecm-tutor-wallet-banner--dashboard {
	padding: 1rem 1.25rem;
}

.ecm-tutor-wallet-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.ecm-tutor-balance {
	display: inline-block;
	margin: 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a3a5c;
}

.ecm-tutor-rate {
	display: block;
	font-size: 0.9rem;
	color: #64748b;
	margin-top: 0.25rem;
}

.ecm-tutor-wallet-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ecm-tx-table th,
.ecm-tx-table td {
	text-align: right;
}

.ecm-admin-stats {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1.5rem 0;
}

.ecm-stat-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 1rem 1.5rem;
	min-width: 140px;
	text-align: center;
}

.ecm-stat-card strong {
	display: block;
	font-size: 1.5rem;
}

.ecm-nav-wallet-item a {
	display: flex;
	align-items: center;
}

.ecm-nav-wallet {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
	color: #fff !important;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.4;
}

.ecm-nav-wallet__icon {
	font-size: 0.95em;
}

.ecm-nav-balance-amount {
	white-space: nowrap;
}

/* Mobile header bar balance (Edubin hides primary nav below 1200px). */
.ecm-header-wallet {
	display: none;
	align-items: center;
	flex-shrink: 0;
}

.ecm-header-wallet__link {
	display: inline-flex;
	align-items: center;
	text-decoration: none !important;
	line-height: 1;
}

.ecm-nav-wallet--header {
	padding: 0.3rem 0.7rem;
	font-size: 0.82rem;
}

@media only screen and (max-width: 1199px) {
	.ecm-header-wallet {
		display: inline-flex;
	}

	/* Theme customizer sets a huge gap that crowds the mobile header. */
	.edubin-header-right-side {
		gap: 12px !important;
	}

	.edubin-header-right-side .ecm-header-wallet {
		order: 0;
	}
}
