/* ==========================================================================
   Sysgage Membership — front-end styles (scoped to .sgm so themes stay intact)
   ========================================================================== */

.sgm {
	--sgm-accent: #2563eb;
	--sgm-accent-d: color-mix(in srgb, var(--sgm-accent) 85%, #000);
	--sgm-accent-soft: color-mix(in srgb, var(--sgm-accent) 10%, #fff);
	--sgm-text: #0f172a;
	--sgm-text-2: #334155;
	--sgm-muted: #64748b;
	--sgm-border: #e3e8ef;
	--sgm-card: #fff;
	--sgm-bg-soft: #f6f8fc;
	--sgm-green: #15803d;
	--sgm-green-soft: #e8f7ee;
	--sgm-red: #dc2626;
	--sgm-red-soft: #fdecec;
	--sgm-amber: #b45309;
	--sgm-amber-soft: #fef6e4;
	--sgm-radius: 14px;
	--sgm-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
	color: var(--sgm-text);
	font-size: 15px;
	line-height: 1.55;
}

.sgm *,
.sgm *::before,
.sgm *::after { box-sizing: border-box; }

.sgm [hidden] { display: none !important; }

.sgm h2, .sgm h3, .sgm h4 { color: var(--sgm-text); margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
.sgm a { color: var(--sgm-accent); }
.sgm-muted { color: var(--sgm-muted); }
.sgm-small { font-size: 13px; }
.sgm-center { text-align: center; justify-content: center; }

/* Cards */
.sgm-card {
	background: var(--sgm-card);
	border: 1px solid var(--sgm-border);
	border-radius: var(--sgm-radius);
	box-shadow: var(--sgm-shadow);
	padding: 24px;
	margin: 0 0 20px;
}
.sgm-card-narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.sgm-empty { text-align: center; padding: 40px 24px; }
.sgm-summary-kicker { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sgm-muted); margin-bottom: 4px; }

/* Buttons */
.sgm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
	font-size: 15px; font-weight: 600; line-height: 1.1; text-decoration: none !important;
	cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
	font-family: inherit; white-space: nowrap;
}
.sgm-btn:active { transform: translateY(1px); }
.sgm-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sgm-accent) 40%, transparent); outline-offset: 2px; }
.sgm-btn-primary { background: var(--sgm-accent); color: #fff !important; box-shadow: 0 4px 14px color-mix(in srgb, var(--sgm-accent) 30%, transparent); }
.sgm-btn-primary:hover { background: var(--sgm-accent-d); }
.sgm-btn-ghost { background: #fff; border-color: var(--sgm-border); color: var(--sgm-text-2) !important; }
.sgm-btn-ghost:hover { border-color: var(--sgm-accent); color: var(--sgm-accent) !important; }
.sgm-btn-danger { background: var(--sgm-red); color: #fff !important; }
.sgm-btn-danger:hover { background: #b91c1c; }
.sgm-btn-link { background: none; border: 0; color: var(--sgm-muted) !important; text-decoration: underline !important; padding: 0 6px; min-height: 36px; font-weight: 500; }
.sgm-btn-link:hover { color: var(--sgm-red) !important; }
.sgm-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.sgm-btn-lg { min-height: 52px; font-size: 16.5px; }
.sgm-btn-block { width: 100%; }
.sgm-btn.is-disabled, .sgm-btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.sgm-btn.is-loading { pointer-events: none; opacity: .8; }
.sgm-btn.is-loading::before { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sgm-spin .7s linear infinite; }
.sgm-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 0; }
.sgm-inline-form { display: inline; margin: 0; }

/* Notices */
.sgm-notice { padding: 12px 16px; border-radius: 10px; border: 1px solid; margin: 0 0 18px; font-size: 14.5px; }
.sgm-notice > div + div { margin-top: 4px; }
.sgm-notice-error { background: var(--sgm-red-soft); border-color: #f6c7c7; color: #7f1d1d; }
.sgm-notice-success { background: var(--sgm-green-soft); border-color: #bfe5cd; color: #14532d; }
.sgm-notice-info { background: var(--sgm-accent-soft); border-color: color-mix(in srgb, var(--sgm-accent) 25%, #fff); color: color-mix(in srgb, var(--sgm-accent) 70%, #000); }
.sgm-notice-warning { background: var(--sgm-amber-soft); border-color: #f5d9a8; color: #78350f; }

/* Badges */
.sgm-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef2f7; color: var(--sgm-text-2); }
.sgm-badge-green { background: var(--sgm-green-soft); color: var(--sgm-green); }
.sgm-badge-blue { background: var(--sgm-accent-soft); color: var(--sgm-accent); }
.sgm-badge-amber { background: var(--sgm-amber-soft); color: var(--sgm-amber); }
.sgm-badge-orange { background: #fff1e7; color: #c2410c; }
.sgm-badge-red { background: var(--sgm-red-soft); color: var(--sgm-red); }

/* Forms */
.sgm-field { margin: 0 0 14px; }
.sgm-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--sgm-text-2); }
.sgm-field abbr { color: var(--sgm-red); text-decoration: none; }
.sgm input[type="text"], .sgm input[type="email"], .sgm input[type="password"], .sgm input[type="tel"], .sgm input[type="number"], .sgm input[type="date"], .sgm input[type="url"], .sgm select, .sgm textarea {
	width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #cfd8e3; border-radius: 10px;
	background: #fff; color: var(--sgm-text); font-size: 15.5px; font-family: inherit; box-shadow: none; margin: 0;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.sgm input:focus, .sgm select:focus, .sgm textarea:focus { outline: none; border-color: var(--sgm-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sgm-accent) 18%, transparent); }
.sgm-help { display: block; color: var(--sgm-muted); font-size: 12.5px; margin-top: 6px; }
.sgm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sgm-row-3 { grid-template-columns: 2fr 1.4fr 1fr; }
.sgm-pass-wrap { position: relative; display: block; }
.sgm-pass-wrap input { padding-right: 46px; }
.sgm-pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; padding: 8px; opacity: .55; font-size: 15px; }
.sgm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Pricing */
.sgm-pricing { display: grid; gap: 22px; grid-template-columns: repeat(var(--sgm-cols, 3), minmax(0, 1fr)); align-items: stretch; margin: 10px 0 18px; }
.sgm-cols-1 { --sgm-cols: 1; max-width: 440px; margin-left: auto; margin-right: auto; }
.sgm-cols-2 { --sgm-cols: 2; max-width: 860px; margin-left: auto; margin-right: auto; }
.sgm-cols-3 { --sgm-cols: 3; }
.sgm-cols-4 { --sgm-cols: 4; }
/* Fit the space the theme gives us, not just the screen width. */
.sgm-pricing-wrap { container-type: inline-size; }
@container (max-width: 1000px) { .sgm-pricing.sgm-cols-4 { --sgm-cols: 2; max-width: 860px; margin-left: auto; margin-right: auto; } }
@container (max-width: 760px) { .sgm-pricing.sgm-cols-3 { --sgm-cols: 2; } }
@container (max-width: 540px) { .sgm-pricing.sgm-pricing { --sgm-cols: 1; max-width: 440px; margin-left: auto; margin-right: auto; } }
.sgm-plan {
	--sgm-card-accent: var(--sgm-accent);
	position: relative; display: flex; flex-direction: column;
	background: var(--sgm-card); border: 1px solid var(--sgm-border); border-radius: 18px;
	padding: 28px 24px 24px; box-shadow: var(--sgm-shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.sgm-plan:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 23, 42, .1); }
.sgm-plan.is-featured { border: 2px solid var(--sgm-card-accent); box-shadow: 0 18px 40px color-mix(in srgb, var(--sgm-card-accent) 18%, transparent); }
.sgm-plan.is-current { background: linear-gradient(180deg, var(--sgm-accent-soft), #fff 40%); }
.sgm-plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--sgm-card-accent); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.sgm-plan-name { font-size: 20px; margin: 0 0 6px; }
.sgm-plan-desc { color: var(--sgm-muted); font-size: 14px; }
.sgm-plan-desc p { margin: 0 0 6px; }
.sgm-plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.sgm-plan-amount { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--sgm-text); }
.sgm-plan-period { color: var(--sgm-muted); font-weight: 500; }
.sgm-plan-terms { color: var(--sgm-muted); font-size: 13px; margin: 0 0 16px; min-height: 2.6em; }
.sgm-plan-features { list-style: none; margin: 0 0 22px; padding: 16px 0 0; border-top: 1px solid var(--sgm-border); display: grid; gap: 10px; flex: 1; align-content: start; }
.sgm-plan-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin: 0; }
.sgm-plan-features svg { flex: none; width: 20px; height: 20px; color: var(--sgm-card-accent); background: color-mix(in srgb, var(--sgm-card-accent) 12%, #fff); border-radius: 50%; padding: 2px; }
.sgm-plan-cta { margin-top: auto; }
.sgm-plan.is-featured .sgm-btn-primary { background: var(--sgm-card-accent); }
.sgm-pricing-foot { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--sgm-muted); font-size: 13px; text-align: center; margin: 4px 0 0; }
.sgm-pricing-foot svg { width: 16px; height: 16px; color: var(--sgm-green); flex: none; }

/* --------------------------------------------------------------- Checkout */
.sgm-checkout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.sgm-step { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 16px; }
.sgm-step span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sgm-accent); color: #fff; font-size: 13px; font-weight: 700; }
.sgm-signed-in { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--sgm-border); border-radius: 12px; background: var(--sgm-bg-soft); margin-bottom: 14px; }
.sgm-signed-in img { border-radius: 50%; }
.sgm-signed-in div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sgm-signed-in span { color: var(--sgm-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sgm-signed-in a { font-size: 13px; }
.sgm-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sgm-method { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--sgm-border); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; min-height: 56px; }
.sgm-method:hover { border-color: color-mix(in srgb, var(--sgm-accent) 50%, #fff); }
.sgm-method input { position: absolute; opacity: 0; pointer-events: none; }
.sgm-method:has(input:checked) { border-color: var(--sgm-accent); background: var(--sgm-accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sgm-accent) 14%, transparent); }
.sgm-method:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--sgm-accent) 40%, transparent); outline-offset: 2px; }
.sgm-method.is-checked { border-color: var(--sgm-accent); background: var(--sgm-accent-soft); }
.sgm-pm-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: #eef2f7; color: var(--sgm-text-2); }
.sgm-pm-icon svg { width: 20px; height: 20px; }
.sgm-pm-letter { font-weight: 800; font-size: 16px; color: #fff; }
.sgm-pm-gcash .sgm-pm-icon { background: #007dfe; }
.sgm-pm-maya .sgm-pm-icon { background: #00b464; }
.sgm-pm-grabpay .sgm-pm-icon { background: #00b14f; }
.sgm-pm-shopeepay .sgm-pm-icon { background: #ee4d2d; }
.sgm-pm-qrph .sgm-pm-icon { background: #fde8e8; color: #be123c; }
.sgm-pm-card .sgm-pm-icon { background: #e8eefb; color: #1e3a8a; }
.sgm-pm-bank .sgm-pm-icon { background: #ecfdf5; color: #047857; }
.sgm-pm-bnpl .sgm-pm-icon { background: #f3e8ff; color: #7e22ce; }
.sgm-pm-stripe .sgm-pm-icon { background: #efedff; color: #635bff; }
.sgm-pm-paypal .sgm-pm-icon { background: #003087; }
.sgm-pm-later .sgm-pm-icon { background: #f1f5f9; color: var(--sgm-text-2); }
.sgm-pm-label { font-weight: 600; font-size: 14px; line-height: 1.25; }
.sgm-pm-label small { display: block; font-weight: 500; font-size: 12px; color: var(--sgm-muted); margin-top: 2px; }
.sgm-method[hidden] { display: none; }
.sgm-renew-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--sgm-bg-soft); font-size: 13.5px; color: var(--sgm-text-2); }
.sgm-renew-note:empty { display: none; }
.sgm-paymongo-note { margin-top: 10px; }
.sgm-terms { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 14px; color: var(--sgm-text-2); cursor: pointer; }
.sgm-terms input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--sgm-accent); }
.sgm-checkout-side { position: sticky; top: 24px; }
.sgm-summary { padding: 22px; }
.sgm-summary-head h3 { font-size: 20px; margin-bottom: 4px; }
.sgm-lines { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--sgm-border); }
.sgm-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14.5px; }
.sgm-lines dt { color: var(--sgm-text-2); margin: 0; }
.sgm-lines dd { margin: 0; font-weight: 600; text-align: right; }
.sgm-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 12px; border-top: 1px dashed #cfd8e3; }
.sgm-total span { font-weight: 600; }
.sgm-total strong { font-size: 26px; letter-spacing: -.02em; }
.sgm-summary-terms { font-size: 13px; color: var(--sgm-muted); margin: 8px 0 0; }
.sgm-coupon { margin-top: 14px; border-top: 1px solid var(--sgm-border); padding-top: 12px; }
.sgm-coupon summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--sgm-accent); }
.sgm-coupon-row { display: flex; gap: 8px; margin-top: 10px; }
.sgm-coupon-row input { text-transform: uppercase; min-height: 42px !important; }
.sgm-coupon-row .sgm-btn { min-height: 42px; }
.sgm-coupon-msg { font-size: 13px; margin: 8px 0 0; color: var(--sgm-green); }
.sgm-coupon-msg.is-error { color: var(--sgm-red); }
.sgm-coupon-msg:empty { display: none; }
.sgm-assurances { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.sgm-assurances li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sgm-muted); margin: 0; }
.sgm-assurances svg { width: 15px; height: 15px; color: var(--sgm-green); flex: none; }

/* Card form */
.sgm-cardpay { max-width: 480px; margin: 0 auto 20px; }
.sgm-cardpay-head { text-align: center; margin-bottom: 18px; }
.sgm-cardpay-amount { font-size: 30px; font-weight: 800; margin: 4px 0; letter-spacing: -.02em; }
.sgm-cardpay-amount span { font-size: 15px; font-weight: 500; color: var(--sgm-muted); }
.sgm-cardpay .sgm-row-3 { grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- Locked */
.sgm-teaser { position: relative; max-height: 15em; overflow: hidden; }
.sgm-teaser::after { content: ""; position: absolute; inset: auto 0 0; height: 70%; background: linear-gradient(180deg, transparent, var(--sgm-fade, #fff)); pointer-events: none; }
.sgm-locked-box { text-align: center; padding: 32px 24px; margin: 18px 0 28px; border-radius: 18px; border: 1px solid var(--sgm-border); background: linear-gradient(180deg, var(--sgm-accent-soft), #fff 70%); box-shadow: var(--sgm-shadow); }
.sgm-locked-box.is-compact { padding: 22px 18px; margin: 12px 0; }
.sgm-locked-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: var(--sgm-accent); color: #fff; margin-bottom: 12px; box-shadow: 0 8px 20px color-mix(in srgb, var(--sgm-accent) 30%, transparent); }
.sgm-locked-icon svg { width: 26px; height: 26px; }
.sgm-locked-title { font-size: 22px !important; margin-bottom: 6px !important; }
.sgm-locked-msg { color: var(--sgm-text-2); max-width: 520px; margin: 0 auto; }
.sgm-locked-msg p { margin: 0 0 8px; }
.sgm-locked-levels { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px 0 0; }
.sgm-locked-level { display: flex; flex-direction: column; min-width: 140px; padding: 10px 14px; border: 1px solid var(--sgm-border); border-radius: 12px; background: #fff; text-decoration: none !important; color: var(--sgm-text) !important; transition: border-color .15s ease; }
.sgm-locked-level:hover { border-color: var(--sgm-accent); }
.sgm-locked-level span { color: var(--sgm-muted); font-size: 13px; }
.sgm-locked-box .sgm-actions { justify-content: center; }
.sgm-inline-locked { padding: 10px 14px; border-radius: 10px; background: #f1f5f9; color: var(--sgm-muted); }

/* ---------------------------------------------------------------- Login */
.sgm-login h2 { font-size: 24px; }
.sgm-login form p { margin: 0 0 14px; }
.sgm-login label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--sgm-text-2); }
.sgm-login .login-remember label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sgm-login input[type="submit"] { width: 100%; min-height: 48px; border: 0; border-radius: 10px; background: var(--sgm-accent); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; }
.sgm-login input[type="submit"]:hover { background: var(--sgm-accent-d); }
.sgm-login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 6px 0 0; }

/* --------------------------------------------------------------- Thanks */
.sgm-thanks { text-align: center; padding: 36px 28px; }
.sgm-thanks h2 { font-size: 24px; }
.sgm-thanks-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 14px; }
.sgm-thanks-icon svg { width: 32px; height: 32px; }
.sgm-thanks-icon.is-success { background: var(--sgm-green-soft); color: var(--sgm-green); }
.sgm-thanks-icon.is-info { background: var(--sgm-accent-soft); color: var(--sgm-accent); }
.sgm-thanks-icon.is-error { background: var(--sgm-red-soft); color: var(--sgm-red); }
.sgm-thanks-icon.is-wait { background: var(--sgm-accent-soft); }
.sgm-thanks-lines { text-align: left; max-width: 360px; margin: 18px auto 0; }
.sgm-manual-box { text-align: left; background: var(--sgm-bg-soft); border: 1px dashed #cfd8e3; border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.sgm-spinner { width: 28px; height: 28px; border: 3px solid var(--sgm-accent); border-right-color: transparent; border-radius: 50%; animation: sgm-spin .8s linear infinite; }
@keyframes sgm-spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- Account */
.sgm-account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sgm-account-head img { border-radius: 50%; }
.sgm-account-head h2 { font-size: 22px; margin: 0; }
.sgm-account-head > div { flex: 1; min-width: 0; }
.sgm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--sgm-border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.sgm-tabs::-webkit-scrollbar { display: none; }
.sgm-tabs a { padding: 10px 14px; font-weight: 600; color: var(--sgm-muted) !important; text-decoration: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sgm-tabs a.is-active { color: var(--sgm-accent) !important; border-bottom-color: var(--sgm-accent); }
.sgm-mcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sgm-mcard-head h3 { font-size: 22px; margin: 0; }
.sgm-mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 16px; background: var(--sgm-bg-soft); border-radius: 12px; }
.sgm-mgrid dt { font-size: 12px; color: var(--sgm-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 2px; }
.sgm-mgrid dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.sgm-mgrid-wide { grid-column: 1 / -1; }
.sgm-mgrid-wide dd { font-weight: 500; color: var(--sgm-text-2); }
.sgm-cancel-panel { margin-top: 16px; padding: 18px; border: 1px solid #f6c7c7; border-radius: 12px; background: #fffafa; }
.sgm-past summary { cursor: pointer; font-weight: 600; }
.sgm-past-list { list-style: none; margin: 14px 0 0; padding: 0; }
.sgm-past-list li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--sgm-border); flex-wrap: wrap; margin: 0; }
.sgm-past-list li > span:first-child { flex: 1; min-width: 180px; }
.sgm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sgm-grid-2 .sgm-card { margin: 0; }
.sgm-table-wrap { overflow-x: auto; }
.sgm-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.sgm-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--sgm-muted); padding: 8px 10px; border-bottom: 1px solid var(--sgm-border); background: none; }
.sgm-table td { padding: 12px 10px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.sgm-td-actions { text-align: right; }

/* --------------------------------------------------------------- Mobile */
@media (max-width: 900px) {
	.sgm-pricing { --sgm-cols: 2 !important; }
	.sgm-checkout { grid-template-columns: 1fr; }
	.sgm-checkout-side { position: static; order: -1; }
}
@media (max-width: 640px) {
	.sgm { font-size: 15px; }
	.sgm-card { padding: 18px; border-radius: 12px; }
	.sgm-pricing { --sgm-cols: 1 !important; gap: 26px; }
	.sgm-row, .sgm-row-3, .sgm-grid-2 { grid-template-columns: 1fr; gap: 0; }
	.sgm-grid-2 .sgm-card { margin-bottom: 16px; }
	.sgm-methods { grid-template-columns: 1fr 1fr; }
	.sgm-mgrid { grid-template-columns: 1fr 1fr; }
	.sgm-actions .sgm-btn { flex: 1 1 auto; }
	.sgm-table thead { display: none; }
	.sgm-table, .sgm-table tbody, .sgm-table tr, .sgm-table td { display: block; width: 100%; }
	.sgm-table tr { border: 1px solid var(--sgm-border); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; }
	.sgm-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 7px 0; text-align: right; }
	.sgm-table td::before { content: attr(data-label); font-weight: 600; color: var(--sgm-muted); text-align: left; }
	.sgm-table td.sgm-td-actions::before { content: none; }
	.sgm-td-actions { justify-content: flex-end !important; }
	.sgm-account-head .sgm-logout { display: none; }
	.sgm-plan-amount { font-size: 34px; }
}

/* --------------------------------------------------------------------------
   Payment problem (past due / delinquent)
   -------------------------------------------------------------------------- */
.sgm-billing-issue { display: flex; gap: 16px; align-items: flex-start; border-color: #f5d9a8; background: linear-gradient(180deg, var(--sgm-amber-soft), var(--sgm-card) 70%); scroll-margin-top: 90px; }
.sgm-billing-issue.is-hold { border-color: #f6c6c6; background: linear-gradient(180deg, var(--sgm-red-soft), var(--sgm-card) 70%); }
.sgm-bi-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--sgm-amber); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.is-hold .sgm-bi-icon { color: var(--sgm-red); }
.sgm-bi-icon svg { width: 24px; height: 24px; }
.sgm-bi-body { flex: 1; min-width: 0; }
.sgm-bi-body > * { margin-top: 0; }
.sgm-bi-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sgm-amber); margin-bottom: 2px; }
.is-hold .sgm-bi-kicker { color: var(--sgm-red); }
.sgm-billing-issue h3 { font-size: 19px; margin: 0 0 6px !important; }
.sgm-bi-text { margin: 0 0 14px; color: var(--sgm-text-2); }
.sgm-bi-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.sgm-bi-facts div { background: rgba(255, 255, 255, .75); border: 1px solid var(--sgm-border); border-radius: 10px; padding: 9px 12px; }
.sgm-bi-facts dt { font-size: 12px; color: var(--sgm-muted); margin: 0; }
.sgm-bi-facts dd { margin: 2px 0 0; font-weight: 700; }
.sgm-bi-hint { margin: 12px 0 0; font-size: 13px; color: var(--sgm-muted); }
.sgm-billing-issue .sgm-actions { margin: 0; }
.sgm-billing-issue.is-compact { text-align: left; }
.sgm-locked-box.is-payment { padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }
.sgm-locked-box .sgm-billing-issue { margin: 0; }
.sgm-locked-box .sgm-billing-issue .sgm-actions { justify-content: flex-start; }
@media (max-width: 600px) {
	.sgm-billing-issue { flex-direction: column; align-items: stretch; gap: 10px; }
	.sgm-bi-icon { align-self: flex-start; }
	.sgm-bi-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.sgm-billing-issue .sgm-actions .sgm-btn { width: 100%; justify-content: center; }
}

/* Site-wide payment notice bar */
.sgm-paybar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 99990; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; background: #1f2937; color: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .25); font-size: 14px; line-height: 1.4; }
.sgm-paybar.is-hold { background: #7f1d1d; }
.sgm-paybar[hidden] { display: none; }
.sgm-paybar-text { flex: 1; min-width: 0; }
.sgm-paybar-text strong { color: #fff; }
.sgm .sgm-paybar a.sgm-paybar-cta, .sgm-paybar a.sgm-paybar-cta { flex: 0 0 auto; background: #fff; color: #111827; text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.sgm-paybar-close { flex: 0 0 auto; background: transparent; border: 0; color: rgba(255, 255, 255, .75); font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.sgm-paybar-close:hover, .sgm-paybar-close:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); outline: 0; }
@media (max-width: 600px) {
	.sgm-paybar { flex-wrap: wrap; left: 8px; right: 8px; bottom: 8px; }
	.sgm-paybar-text { flex-basis: calc(100% - 40px); }
	.sgm-paybar a.sgm-paybar-cta { flex: 1; text-align: center; }
}

/* ---------- 1.2: proof of transfer, My content, protected files ---------- */
.sgm-proof { margin: 22px 0 0; text-align: left; }
.sgm-proof .sgm-notice { margin-bottom: 14px; }
.sgm-proof-status { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--sgm-border); border-radius: 10px; background: var(--sgm-bg-soft); font-size: 14px; color: var(--sgm-text-2); }
.sgm-proof-form { border: 1px solid var(--sgm-border); border-radius: var(--sgm-radius); padding: 20px; background: var(--sgm-card); }
.sgm-proof-form h3 { font-size: 17px; margin-bottom: 4px; }
.sgm-proof-form > p { margin-top: 0; }
.sgm-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; margin: 0 0 14px; border: 2px dashed var(--sgm-border); border-radius: 12px; background: var(--sgm-bg-soft); cursor: pointer; transition: border-color .15s, background .15s; flex-wrap: wrap; }
.sgm-drop:hover, .sgm-drop:focus-within { border-color: var(--sgm-accent); background: var(--sgm-accent-soft); }
.sgm-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sgm-drop-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #fff; color: var(--sgm-accent); box-shadow: var(--sgm-shadow); }
.sgm-drop-text { display: flex; flex-direction: column; min-width: 0; }
.sgm-drop-name { flex-basis: 100%; font-weight: 600; color: var(--sgm-green); font-size: 14px; word-break: break-all; }
.sgm-drop-name:empty { display: none; }
.sgm-invoice-proof .sgm-manual-box { margin-bottom: 16px; }
.sgm-content-list { list-style: none; margin: 0; padding: 0; }
.sgm-content-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sgm-border); }
.sgm-content-list li:first-child { border-top: 0; }
.sgm-content-list li.is-scheduled { opacity: .7; }
.sgm-content-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--sgm-accent-soft); color: var(--sgm-accent); }
.sgm-content-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sgm-content-main a { text-decoration: none; }
@media (max-width: 560px) {
	.sgm-proof-form { padding: 16px; }
	.sgm-content-list li { flex-wrap: wrap; }
	.sgm-content-list .sgm-btn { margin-left: 52px; }
}
.sgm-file, .sgm-file-locked { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 1em 0; border: 1px solid var(--sgm-border); border-radius: 12px; background: var(--sgm-card); box-shadow: var(--sgm-shadow); flex-wrap: wrap; }
.sgm-file-locked { background: var(--sgm-bg-soft); box-shadow: none; }
.sgm-file-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--sgm-accent-soft); color: var(--sgm-accent); }
.sgm-file-locked .sgm-file-icon { background: #eef2f7; color: var(--sgm-muted); }
.sgm-file-icon svg { width: 22px; height: 22px; }
.sgm-file-main { flex: 1; min-width: 160px; display: flex; flex-direction: column; font-size: 14px; }
.sgm-file-main span { color: var(--sgm-muted); font-size: 13px; }
.sgm-file .sgm-btn svg { width: 16px; height: 16px; margin-right: 4px; }
.sgm-video, .sgm-audio { margin: 1em 0; }
.sgm-video video { display: block; width: 100%; height: auto; border-radius: 12px; background: #000; }
.sgm-audio audio { width: 100%; }
.sgm-inline-locked { color: var(--sgm-muted); font-style: italic; }

/* ---------------------------------------------------------------- Courses (1.3) */
.sgm .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.sgm-progress { margin: 12px 0 18px; }
.sgm-progress-track { height: 10px; border-radius: 999px; background: #e9eef5; overflow: hidden; }
.sgm-progress-track span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sgm-accent), color-mix(in srgb, var(--sgm-accent) 70%, #22c55e)); transition: width .4s ease; }
.sgm-progress.is-complete .sgm-progress-track span { background: var(--sgm-green); }
.sgm-progress-text { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--sgm-muted); }
.sgm-progress-text strong { color: var(--sgm-text); font-size: 15px; }
.sgm-progress.is-compact { margin: 8px 0 12px; }
.sgm-progress.is-compact .sgm-progress-track { height: 7px; }

.sgm-course { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--sgm-border); border-radius: var(--sgm-radius); background: var(--sgm-card); box-shadow: var(--sgm-shadow); }
.sgm-course-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sgm-course-head h3 { margin: 0 0 2px !important; font-size: 19px; }
.sgm-course-done { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 18px; border-radius: 12px; background: var(--sgm-green-soft); color: var(--sgm-green); }
.sgm-course-done div { display: flex; flex-direction: column; }
.sgm-course-done strong { color: var(--sgm-text); }
.sgm-course-done-icon { display: inline-flex; flex: none; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 14px; background: var(--sgm-green); color: #fff; }

.sgm-outline { list-style: none; margin: 14px 0 0 !important; padding: 0 !important; }
.sgm-outline li { margin: 0; padding: 0; }
.sgm-outline-section { margin: 16px 0 4px calc(var(--sgm-depth, 0) * 22px) !important; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sgm-muted); }
.sgm-outline-section a { color: inherit; text-decoration: none; }
.sgm-outline-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px !important; margin-left: calc(var(--sgm-depth, 0) * 22px) !important; border-radius: 10px; border: 1px solid transparent; }
.sgm-outline-item + .sgm-outline-item { margin-top: 2px; }
.sgm-outline-item:hover { background: var(--sgm-bg-soft); }
.sgm-outline-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--sgm-border); background: #fff; font-size: 13px; font-weight: 700; color: var(--sgm-text-2); }
.sgm-outline-item.is-done .sgm-outline-mark { background: var(--sgm-green); border-color: var(--sgm-green); color: #fff; }
.sgm-outline-item.is-open .sgm-outline-mark { border-color: var(--sgm-accent); color: var(--sgm-accent); }
.sgm-outline-item.is-locked .sgm-outline-mark,
.sgm-outline-item.is-members .sgm-outline-mark,
.sgm-outline-item.is-soon .sgm-outline-mark { background: #f1f5f9; color: var(--sgm-muted); }
.sgm-outline-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.sgm-outline-main > a, .sgm-outline-title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.sgm-outline-main > a { color: var(--sgm-text); }
.sgm-outline-main > a:hover { color: var(--sgm-accent); }
.sgm-outline-item.is-done .sgm-outline-main > a { color: var(--sgm-text-2); }
.sgm-outline-item.is-locked .sgm-outline-title, .sgm-outline-item.is-members .sgm-outline-title, .sgm-outline-item.is-soon .sgm-outline-title { color: var(--sgm-muted); }
.sgm-outline-sub { display: inline-flex; align-items: center; gap: 8px; }

.sgm-lesson-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 22px; border: 1px solid var(--sgm-border); border-radius: 12px; background: var(--sgm-bg-soft); font-size: 14px; }
.sgm-lesson-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none !important; color: var(--sgm-text) !important; min-width: 0; }
.sgm-lesson-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.sgm-lesson-back:hover { color: var(--sgm-accent) !important; }
.sgm-lesson-meta { color: var(--sgm-muted); }
.sgm-lesson-bar > :last-child:not(.sgm-lesson-meta) { margin-left: auto; }
.sgm-lesson-mini { display: inline-block; width: 110px; height: 7px; border-radius: 999px; background: #e3e8ef; overflow: hidden; }
.sgm-lesson-mini span { display: block; height: 100%; background: var(--sgm-accent); border-radius: inherit; }
.sgm-lesson-done-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; background: var(--sgm-green-soft); color: var(--sgm-green); font-weight: 600; font-size: 13px; }

.sgm-lesson-panel { margin: 32px 0 12px; padding: 22px; border: 1px solid var(--sgm-border); border-radius: var(--sgm-radius); background: var(--sgm-card); box-shadow: var(--sgm-shadow); }
.sgm-lesson-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--sgm-border); }
.sgm-lesson-status p { margin: 0; }
.sgm-complete-form { margin: 0; }
.sgm-complete-form .sgm-btn svg { margin-left: -4px; }
.sgm-lesson-done-big { display: inline-flex; align-items: center; gap: 12px; color: var(--sgm-green); }
.sgm-lesson-done-big > svg { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: var(--sgm-green-soft); }
.sgm-lesson-done-big > span { display: flex; flex-direction: column; color: var(--sgm-text); }
.sgm-undo-form { margin: 0; }
.sgm-lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sgm-lesson-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--sgm-border); border-radius: 12px; text-decoration: none !important; color: var(--sgm-text) !important; min-width: 0; transition: border-color .15s ease, background .15s ease; }
.sgm-lesson-link strong { overflow-wrap: anywhere; }
.sgm-lesson-link:hover { border-color: var(--sgm-accent); background: var(--sgm-accent-soft); }
.sgm-lesson-link.is-next { text-align: right; align-items: flex-end; grid-column: 2; }
.sgm-lesson-link .sgm-small { display: inline-flex; align-items: center; gap: 4px; }
.sgm-lesson-link.is-locked strong { color: var(--sgm-muted); }

.sgm-course-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.sgm-course-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.sgm-course-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 8; background: center / cover no-repeat var(--sgm-accent-soft); color: var(--sgm-accent); }
.sgm-course-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.sgm-course-card-body h4 { margin: 0 !important; font-size: 16px; }
.sgm-course-card-body h4 a { color: var(--sgm-text); text-decoration: none; }
.sgm-course-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.sgm-course-card.is-complete .sgm-course-thumb.is-empty { background-color: var(--sgm-green-soft); color: var(--sgm-green); }

@media (max-width: 600px) {
	.sgm-course { padding: 18px 16px; }
	.sgm-course-head .sgm-btn { width: 100%; }
	.sgm-outline-item { padding: 9px 8px !important; margin-left: calc(var(--sgm-depth, 0) * 12px) !important; }
	.sgm-outline-section { margin-left: calc(var(--sgm-depth, 0) * 12px) !important; }
	.sgm-lesson-back span { max-width: 24ch; }
	.sgm-lesson-panel { padding: 18px 16px; }
	.sgm-lesson-status .sgm-complete-form, .sgm-lesson-status .sgm-complete-form .sgm-btn { width: 100%; }
	.sgm-lesson-nav { grid-template-columns: 1fr; }
	.sgm-lesson-link.is-next { grid-column: auto; }
}
@media (max-width: 600px) { .sgm-tabs { gap: 0; } .sgm-tabs a { padding: 10px 9px; font-size: 14px; } }
