/*
 * Moliya Pro — umumiy dizayn tuzatishlari (barcha sahifalarda eng oxirida ulanadi).
 * Eski style.css fayllariga tegilmagan: bu fayl faqat ustidan yozadi.
 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
	--mp-w: 250px;
	--mp-top: 56px;
	--mp-bg: #141927;
	--mp-bg-2: #1A233A;
	--mp-card: #222B45;
	--mp-line: #2A3554;
	--mp-text: #DCE6FB;
	--mp-muted: #8EA3C2;
	--mp-accent: #5A8DEE;
	--mp-accent-2: #457CE3;
}

/* ---------- Umumiy ---------- */
html, body { min-width: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
/* Eski "*{font-family: microsoftsansserif...serif}" o'rniga (ikonka shriftlari o'z klassi bilan ustun qoladi) */
* { font-family: "Open Sans", Arial, sans-serif; }
img, video, iframe { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
input, select, textarea { font-size: 16px; } /* iPhone'da maydonga bosganda sahifa kattalashib ketmasin */
:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 2px; }

/* Ikonka klassi (fa) berilgan sarlavhalar: matn oddiy shriftda, ikonka o'z shriftida */
h1.fa, h2.fa, h3.fa, h4.fa, h5.fa, p.fa, div.fa, span.fa:not(:empty), a.fa {
	font-family: "Open Sans", Arial, sans-serif;
}
h1.fa::before, h2.fa::before, h3.fa::before, h4.fa::before, h5.fa::before,
p.fa::before, div.fa::before, span.fa::before, a.fa::before {
	font-family: FontAwesome;
}

/* ---------- Yagona menyu ---------- */
html.mp-nav .menu_profile,
html.mp-nav .menu_mobile { display: none !important; }
html.mp-nav body { padding-left: var(--mp-w); background-color: var(--mp-bg-2); }
html.mp-nav .profile_content { margin-left: 0 !important; }

.mp-shell, .mp-shell * { box-sizing: border-box; }
.mp-topbar { display: none; }
.mp-overlay { display: none; }

.mp-sidebar {
	position: fixed;
	z-index: 1040;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--mp-w);
	display: flex;
	flex-direction: column;
	background: var(--mp-bg);
	border-right: 1px solid var(--mp-line);
	overflow-y: auto;
	overscroll-behavior: contain;
	text-align: left;
}
.mp-sidebar-head {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 16px 10px;
}
.mp-brand { display: block; }
.mp-brand img { display: block; width: 150px; height: auto; border-radius: 8px; }
.mp-close { display: none; }

.mp-nav { flex: 1 0 auto; padding: 4px 12px 12px; }
.mp-group { margin-top: 14px; }
.mp-group-title {
	padding: 0 12px 6px;
	color: var(--mp-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.mp-link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--mp-text) !important;
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none !important;
	transition: background-color 0.15s, color 0.15s;
}
.mp-link i { width: 18px; text-align: center; color: var(--mp-muted); font-size: 16px; flex: none; }
.mp-link span { color: inherit; }
.mp-link:hover { background: #1F2A47; }
.mp-link:hover i { color: var(--mp-text); }
.mp-link.is-active { background: rgba(90, 141, 238, 0.18); color: #fff !important; font-weight: 600; }
.mp-link.is-active i { color: var(--mp-accent); }
.mp-logout { margin: 0 12px 16px; border-top: 1px solid var(--mp-line); border-radius: 0; padding-top: 14px; color: var(--mp-muted) !important; }

/* ---------- Telefon va planshet ---------- */
@media (max-width: 1050px) {
	html.mp-nav body { padding-left: 0; padding-top: var(--mp-top); }

	.mp-topbar {
		display: flex;
		align-items: center;
		gap: 8px;
		position: fixed;
		z-index: 1030;
		top: 0;
		left: 0;
		right: 0;
		height: var(--mp-top);
		padding: 0 8px;
		background: var(--mp-bg);
		border-bottom: 1px solid var(--mp-line);
	}
	.mp-burger, .mp-top-exit, .mp-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: var(--mp-text) !important;
		cursor: pointer;
		text-decoration: none !important;
		font-size: 20px;
	}
	.mp-burger { flex-direction: column; gap: 5px; }
	.mp-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--mp-text); }
	.mp-burger:hover, .mp-top-exit:hover, .mp-close:hover { background: #1F2A47; }
	.mp-top-brand {
		flex: 1;
		color: #fff !important;
		font-size: 18px;
		font-weight: 700;
		text-decoration: none !important;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.mp-sidebar {
		width: min(300px, 86vw);
		transform: translateX(-100%);
		transition: transform 0.25s ease, visibility 0.25s;
		visibility: hidden;
		box-shadow: 8px 0 30px rgba(0, 0, 0, 0.45);
	}
	.mp-sidebar-head { justify-content: space-between; padding: 12px 8px 6px 16px; }
	.mp-brand img { width: 120px; }
	.mp-close { display: inline-flex; }

	.mp-overlay {
		display: block;
		position: fixed;
		z-index: 1035;
		inset: 0;
		background: rgba(5, 8, 16, 0.6);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s, visibility 0.25s;
	}
	html.mp-open .mp-sidebar { transform: none; visibility: visible; }
	html.mp-open .mp-overlay { opacity: 1; visibility: visible; }
	html.mp-open, html.mp-open body { overflow: hidden; }
}

/* ---------- Balans qatori (BL / BN / login) ---------- */
html.mp-nav .header-user {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-bottom: 8px;
}
html.mp-nav .header-user .balansdiv { width: auto !important; display: flex !important; flex-wrap: wrap; gap: 8px; }
html.mp-nav .header-user .profile_1 { margin: 0 !important; }
html.mp-nav .header-user a.fa,
html.mp-nav .header-user span.fa {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	float: none !important;
	margin: 0 !important;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--mp-card);
	border: 1px solid var(--mp-line);
	font-size: 14px !important;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none !important;
}
html.mp-nav .header-user a.fa::before,
html.mp-nav .header-user span.fa::before { color: var(--mp-accent); }

/* ---------- Daraja / bo'lim tugmalari (#1 #2 ... , Pul o'tkazish | Tarix) ---------- */
html.mp-nav .places { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
html.mp-nav .places:has(.degree) { justify-content: center; }
html.mp-nav .places > a { margin: 0 !important; }
html.mp-nav .places .degree {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	min-height: 40px;
	padding: 8px 16px;
}
/* Faol daraja — joriy sahifa (site.js belgilaydi), doim #1 emas */
html.mp-nav .places.mp-has-current .degree { background-color: transparent; }
html.mp-nav .places.mp-has-current .degree.is-current { background-color: #5A8DEE; }

/* ---------- Kontent: planshet ---------- */
@media (max-width: 1050px) {
	html.mp-nav .profile_content { padding: 16px 16px 32px !important; }
	html.mp-nav .profile_content .profile_content { padding: 0 !important; }
}

/* ---------- Kontent: telefon ---------- */
@media (max-width: 600px) {
	html.mp-nav .profile_content { padding: 12px 10px 28px !important; }

	/* Qotirilgan minimal kengliklar telefonga sig'masin */
	.profile_content img[style*="min-width"] { width: 100% !important; }
	.profile_content [style*="min-width"] { min-width: 0 !important; }
	.profile_content .card-box { width: 100% !important; margin: 10px 0 !important; }

	/* Katta ichki chekinishlar */
	.profile_content .profile_settings { padding: 14px 12px 24px !important; }
	.profile_content [style*="padding: 0px 50px"] { padding: 0 8px !important; }
	.profile_content .platoj_d_flex { padding: 10px 12px !important; }

	/* Formalar: maydon va tugmalar ekran kengligida, bir xil o'lchamda */
	.profile_content form input:not([type="checkbox"]):not([type="radio"]),
	.profile_content form select,
	.profile_content form textarea,
	.profile_content .adv_1,
	.profile_content .search2,
	.profile_content .settings_2 {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.profile_content #transferForm,
	.profile_content form.search:not([style*="absolute"]) { margin-left: 0 !important; width: 100% !important; }
	.profile_content .label_a2 { margin-left: 0 !important; }

	/* Tarif matritsalari: kartochkalar 2 ustunda */
	.profile_content .profile_ref[style*="padding: 30px"] { padding: 30px 8px 24px !important; }
	#matrix-wrapper,
	.profile_content :has(> .matrix_0 + .matrix_0) {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	.profile_content .matrix_0 { width: auto !important; margin: 0 !important; display: block !important; }
	#main-card-wrapper .matrix_0 { width: min(230px, 100%) !important; margin: 0 auto 12px !important; }
	.profile_content .matrix_neon_1 { width: 100% !important; height: auto !important; min-height: 190px; padding: 10px 6px !important; }
	.profile_content .matrix_1_avatar { width: 64px !important; height: 64px !important; margin: 6px auto !important; }
	.profile_content .matrix_1_login, .profile_content .matrix_1_date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

	/* Jadvallar: sig'masa, o'zi gorizontal suriladi */
	.profile_content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* Ochiq sahifalar (bosh sahifa, kirish, ro'yxatdan o'tish): bezak elementlari yon tomonga surilmasin */
@media (max-width: 600px) {
	html:not(.mp-nav), html:not(.mp-nav) body { overflow-x: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.mp-sidebar, .mp-overlay { transition: none; }
}
