/* Narumi – "Таны VIP карт" (WC Membership Pro)
   Colours come from Tutor LMS 4 theme variables (--tutor-*), so the page follows
   the dashboard Light / Dark / Auto setting. Fallbacks are neutral tints for use
   outside the Tutor dashboard (shortcode page). */

.wmx-wrap {
	--wmx-accent: #ff0033;
	--wmx-text: var(--tutor-text-primary, currentColor);
	--wmx-muted: var(--tutor-text-subdued, rgba(127,127,127,.95));
	--wmx-surface: var(--tutor-surface-l1, rgba(127,127,127,.06));
	--wmx-border: var(--tutor-border-idle, rgba(127,127,127,.22));
	--wmx-soft: rgba(127,127,127,.10);
	--wmx-radius: 14px;
	color: var(--wmx-text);
	font-family: inherit;
	width: 100%;
	max-width: 100%;
}
.wmx-ctx-page { max-width: 960px; margin: 24px auto 64px; padding: 0 16px; }
.wmx-wrap *, .wmx-wrap *::before, .wmx-wrap *::after { box-sizing: border-box; }
.wmx-wrap h3, .wmx-wrap h4, .wmx-wrap p, .wmx-wrap span, .wmx-wrap div, .wmx-wrap ul, .wmx-wrap li, .wmx-wrap strong, .wmx-wrap small, .wmx-wrap b, .wmx-wrap em {
	font-family: inherit !important;
	color: inherit;
}
.wmx-wrap ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.wmx-wrap li { margin: 0 !important; padding: 0; border: 0; }
.wmx-muted { color: var(--wmx-muted) !important; margin: 0 !important; font-size: 14px; }
.wmx-r { text-align: right; }
.wmx-accent { color: var(--wmx-accent) !important; }

.wmx-page-title { font-size: 22px !important; font-weight: 600 !important; line-height: 1.3 !important; margin: 0 0 20px !important; letter-spacing: 0 !important; text-transform: none !important; }

/* ---------- Top: card + stats ---------- */
.wmx-top { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }

/* The VIP card itself is always dark, like a physical card, in both themes. */
.wmx-wrap .wmx-vcard {
	position: relative; overflow: hidden; isolation: isolate;
	aspect-ratio: 1.586 / 1; min-height: 210px;
	border-radius: 18px; padding: 22px 24px;
	display: flex; flex-direction: column; justify-content: space-between;
	color: #fff !important;
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(255,0,51,.55) 0%, rgba(255,0,51,0) 55%),
		radial-gradient(90% 80% at 0% 100%, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 60%),
		linear-gradient(135deg, #1b1d24 0%, #0d0e12 100%);
	box-shadow: 0 14px 30px -14px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08);
}
.wmx-wrap .wmx-vcard.has-img { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.70)), var(--wmx-card-img) center / cover no-repeat, #0d0e12; }
.wmx-vcard * { color: #fff !important; }
.wmx-vcard-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wmx-vcard-brand { font-size: 13px; font-weight: 600; letter-spacing: .22em; }
.wmx-vcard-brand b { color: var(--wmx-accent) !important; font-weight: 800; }
.wmx-vcard-plan { font-size: 18px; font-weight: 600; line-height: 1.3; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wmx-vcard-disc { font-size: 14px; }
.wmx-vcard-disc span { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.wmx-vcard-foot { align-items: flex-end; }
.wmx-vcard-foot small { display: block; font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.wmx-vcard-foot strong { display: block; font-size: 14px; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Badges */
.wmx-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--wmx-soft); }
.wmx-wrap .wmx-badge--ok { background: rgba(34,197,94,.18) !important; color: #4ade80 !important; }

/* Stats */
.wmx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wmx-stat {
	display: flex; flex-direction: column; justify-content: center; gap: 6px;
	padding: 16px 18px; border-radius: var(--wmx-radius);
	background: var(--wmx-surface) !important; border: 1px solid var(--wmx-border);
	min-width: 0;
}
.wmx-stat-l { font-size: 13px; color: var(--wmx-muted) !important; line-height: 1.3; }
.wmx-stat-v { font-size: 26px; font-weight: 700; line-height: 1.1; }
.wmx-stat-v em { font-style: normal; font-size: 15px; font-weight: 500; color: var(--wmx-muted) !important; margin-left: 2px; }

/* ---------- Cards ---------- */
.wmx-card { border: 1px solid var(--wmx-border); border-radius: var(--wmx-radius); background: var(--wmx-surface) !important; padding: 20px; margin-bottom: 16px; }
.wmx-card-h { font-size: 16px !important; font-weight: 600 !important; margin: 0 0 14px !important; letter-spacing: 0 !important; text-transform: none !important; line-height: 1.3 !important; }

/* Services */
.wmx-svc { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wmx-wrap .wmx-svc-item { padding: 14px 16px !important; border-radius: 12px; border: 1px solid var(--wmx-border) !important; }
.wmx-svc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.wmx-svc-name { font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.wmx-svc-count { font-size: 13px; color: var(--wmx-muted) !important; white-space: nowrap; }
.wmx-svc-count b { font-size: 16px; color: var(--wmx-text) !important; }
.wmx-bar { height: 6px; border-radius: 999px; background: var(--wmx-soft); overflow: hidden; }
.wmx-bar span { display: block; height: 100%; border-radius: inherit; background: var(--wmx-accent); }

/* History */
.wmx-hist { border: 1px solid var(--wmx-border); border-radius: 12px; overflow: hidden; }
.wmx-hrow {
	display: grid; grid-template-columns: 140px minmax(0, 1fr) 120px 70px 80px minmax(0, 150px);
	gap: 12px; align-items: center; padding: 12px 16px; font-size: 14px;
	border-top: 1px solid var(--wmx-border);
}
.wmx-hrow--head { border-top: 0; font-size: 13px; color: var(--wmx-muted) !important; padding-top: 10px; padding-bottom: 10px; background: var(--wmx-soft); }
.wmx-h-date { color: var(--wmx-muted) !important; font-variant-numeric: tabular-nums; }
.wmx-h-svc { font-weight: 500; overflow-wrap: anywhere; }
.wmx-h-amt { color: var(--wmx-accent) !important; font-weight: 600; }
.wmx-h-rem { font-weight: 600; }
.wmx-h-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wmx-muted) !important; }

/* Empty state */
.wmx-empty-card { text-align: center; padding: 44px 20px; border: 1px solid var(--wmx-border); border-radius: var(--wmx-radius); background: var(--wmx-surface) !important; }
.wmx-empty-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(255,0,51,.12) !important; color: var(--wmx-accent) !important; }
.wmx-empty-title { font-size: 18px !important; font-weight: 600 !important; margin: 0 0 6px !important; text-transform: none !important; letter-spacing: 0 !important; }
.wmx-empty-text { margin: 0 auto 18px !important; max-width: 420px; color: var(--wmx-muted) !important; font-size: 14px; line-height: 1.6; }
.wmx-wrap .wmx-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 8px; background: var(--wmx-accent) !important; color: #fff !important; font-size: 14px; font-weight: 500; text-decoration: none !important; border: 0; line-height: 1.2; }
.wmx-wrap .wmx-btn:hover { filter: brightness(1.08); color: #fff !important; }

/* Menu icon */
.wmx-menu-icon { flex-shrink: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
	.wmx-top { grid-template-columns: 1fr; }
	.wmx-wrap .wmx-vcard { max-width: 440px; }
	.wmx-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.wmx-hrow { grid-template-columns: 120px minmax(0, 1fr) 110px 60px 70px minmax(0, 120px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.wmx-page-title { font-size: 20px !important; margin-bottom: 14px !important; }
	.wmx-top { gap: 12px; margin-bottom: 12px; }
	.wmx-wrap .wmx-vcard { max-width: none; width: 100%; min-height: 0; padding: 18px 20px; border-radius: 16px; }
	.wmx-vcard-plan { font-size: 16px; margin-top: 6px; }
	.wmx-vcard-disc span { font-size: 28px; }
	.wmx-vcard-foot strong { max-width: 160px; font-size: 13px; }
	
	.wmx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.wmx-stat { padding: 12px 14px; border-radius: 12px; }
	.wmx-stat-l { font-size: 12px; }
	.wmx-stat-v { font-size: 22px; }

	.wmx-card { padding: 16px; border-radius: 12px; margin-bottom: 12px; }
	.wmx-svc { grid-template-columns: 1fr; gap: 10px; }

	/* History: every row becomes a small card */
	.wmx-hist { border: 0; border-radius: 0; overflow: visible; display: flex; flex-direction: column; gap: 10px; }
	.wmx-hrow--head { display: none; }
	.wmx-hrow {
		grid-template-columns: 1fr auto;
		grid-template-areas: "svc type" "date date" "amt rem" "by by";
		gap: 6px 12px; padding: 14px; border: 1px solid var(--wmx-border); border-radius: 12px;
	}
	.wmx-h-svc { grid-area: svc; font-size: 15px; font-weight: 600; }
	.wmx-h-type { grid-area: type; justify-self: end; }
	.wmx-h-date { grid-area: date; font-size: 12px; }
	.wmx-h-amt { grid-area: amt; text-align: left; }
	.wmx-h-rem { grid-area: rem; }
	.wmx-h-by { grid-area: by; font-size: 12px; white-space: normal; padding-top: 8px; border-top: 1px solid var(--wmx-border); }
	.wmx-h-amt::before, .wmx-h-rem::before, .wmx-h-by::before { content: attr(data-l) ": "; font-weight: 400; color: var(--wmx-muted); font-size: 12px; }
	.wmx-h-amt, .wmx-h-rem { padding-top: 6px; }
}

@media (max-width: 380px) {
	.wmx-vcard-disc span { font-size: 24px; }
		.wmx-stat-v { font-size: 20px; }
}
