.mt5cd-wrap {
	--mt5-bg: #12141a;
	--mt5-card: #1a1d26;
	--mt5-border: #2a2e3a;
	--mt5-gold: #cba135;
	--mt5-gold-soft: #e8cd7a;
	--mt5-green: #2fbf71;
	--mt5-red: #e5484d;
	--mt5-text: #edeef1;
	--mt5-text-muted: #868c99;

	position: relative;
	background: var(--mt5-bg);
	border: 1px solid var(--mt5-border);
	border-radius: 16px;
	padding: 28px;
	color: var(--mt5-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 720px;
	margin: 0 auto;
	box-shadow: 0 20px 45px -25px rgba(0,0,0,0.6);
}

.mt5cd-login-msg {
	color: var(--mt5-text-muted, #868c99);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	padding: 20px;
	text-align: center;
}

.mt5cd-page {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: #0b0c10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px 20px;
	box-sizing: border-box;
	overflow-y: auto;
}

.mt5cd-cards-wrap {
	width: 100%;
	max-width: 720px;
	margin: auto;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mt5cd-wrap-login {
	max-width: 380px;
	width: 100%;
	margin: auto;
}

.mt5cd-login-card {
	display: flex;
	flex-direction: column;
}

.mt5cd-login-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--mt5-gold-soft);
	margin-bottom: 6px;
}

.mt5cd-login-subtitle {
	font-size: 13px;
	color: var(--mt5-text-muted);
	margin-bottom: 20px;
	line-height: 1.5;
}

.mt5cd-login-error {
	background: rgba(229, 72, 77, 0.12);
	border: 1px solid rgba(229, 72, 77, 0.4);
	color: var(--mt5-red);
	font-size: 13px;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 18px;
}

.mt5cd-login-form {
	display: flex;
	flex-direction: column;
}

.mt5cd-login-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--mt5-text-muted);
	margin-bottom: 6px;
	margin-top: 14px;
}

.mt5cd-login-label:first-of-type {
	margin-top: 0;
}

.mt5cd-login-input {
	background: var(--mt5-card);
	border: 1px solid var(--mt5-border);
	border-radius: 8px;
	padding: 11px 14px;
	color: var(--mt5-text);
	font-size: 14px;
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.mt5cd-login-input:focus {
	outline: none;
	border-color: var(--mt5-gold);
}

.mt5cd-login-button {
	margin-top: 24px;
	background: var(--mt5-gold);
	color: #16130a;
	border: none;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.2px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
}

.mt5cd-login-button:hover {
	background: var(--mt5-gold-soft);
}

.mt5cd-login-button:active {
	transform: scale(0.98);
}

.mt5cd-logout-btn {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000000;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #e5484d;
	background: #1a1315;
	border: 1px solid rgba(229, 72, 77, 0.4);
	box-shadow: 0 4px 12px -4px rgba(0,0,0,0.6);
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.mt5cd-logout-btn:hover {
	background: rgba(229, 72, 77, 0.2);
	border-color: rgba(229, 72, 77, 0.7);
	color: #ff6b6f;
}

.mt5cd-logout-btn:active {
	transform: scale(0.94);
}

.mt5cd-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 20px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--mt5-border);
}

.mt5cd-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mt5cd-live-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--mt5-green);
	box-shadow: 0 0 0 0 rgba(47,191,113,0.6);
	animation: mt5cd-pulse 2.2s infinite;
	flex-shrink: 0;
	margin-top: 6px;
}

@keyframes mt5cd-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(47,191,113,0.55); }
	70%  { box-shadow: 0 0 0 8px rgba(47,191,113,0); }
	100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); }
}

.mt5cd-client-name {
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: var(--mt5-gold-soft);
}

.mt5cd-account-label {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 11px;
	color: var(--mt5-text-muted);
	margin-top: 3px;
}

.mt5cd-updated {
	text-align: right;
	font-size: 11px;
	color: var(--mt5-text-muted);
	line-height: 1.5;
}

.mt5cd-updated span {
	color: var(--mt5-gold-soft);
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.mt5cd-body {
	display: flex;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}

.mt5cd-ring-block {
	position: relative;
	width: 150px;
	height: 150px;
	flex-shrink: 0;
	margin: 0 auto;
}

.mt5cd-ring {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.mt5cd-ring-track {
	fill: none;
	stroke: var(--mt5-border);
	stroke-width: 8;
}

.mt5cd-ring-progress {
	fill: none;
	stroke: var(--mt5-gold);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dasharray 0.8s ease;
	filter: drop-shadow(0 0 6px rgba(203,161,53,0.55));
}

.mt5cd-ring-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.mt5cd-ring-value {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 24px;
	font-weight: 700;
	color: var(--mt5-gold-soft);
}

.mt5cd-ring-label {
	font-size: 10px;
	color: var(--mt5-text-muted);
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

.mt5cd-stats {
	flex: 1;
	min-width: 260px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.mt5cd-stat-card {
	background: var(--mt5-card);
	border: 1px solid var(--mt5-border);
	border-radius: 10px;
	padding: 14px 16px;
}

.mt5cd-stat-label {
	font-size: 11px;
	color: var(--mt5-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.mt5cd-stat-value {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 19px;
	font-weight: 700;
}

.mt5cd-stat-card.is-positive .mt5cd-stat-value {
	color: var(--mt5-green);
}

.mt5cd-stat-card.is-negative .mt5cd-stat-value {
	color: var(--mt5-red);
}

/* Tablet / small screens */
@media (max-width: 600px) {
	.mt5cd-wrap {
		padding: 18px;
		border-radius: 12px;
		max-width: 100%;
	}
	.mt5cd-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.mt5cd-updated {
		text-align: left;
	}
	.mt5cd-body {
		flex-direction: column;
		gap: 20px;
	}
	.mt5cd-ring-block {
		margin: 0 auto;
	}
	.mt5cd-stats {
		width: 100%;
		min-width: 0;
	}
}

/* Phones */
@media (max-width: 400px) {
	.mt5cd-wrap {
		padding: 14px;
	}
	.mt5cd-client-name {
		font-size: 16px;
	}
	.mt5cd-stats {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
	.mt5cd-stat-card {
		padding: 12px;
	}
	.mt5cd-stat-value {
		font-size: 16px;
	}
	.mt5cd-ring-block {
		width: 130px;
		height: 130px;
	}
	.mt5cd-ring-value {
		font-size: 21px;
	}
}
