/**
 * SatSell Panel — design system + auth screens.
 *
 * Everything visual is expressed as a custom property in the `--sp-*` namespace
 * so later panel modules (dashboard, reports, genealogy) inherit the same
 * palette, spacing scale and elevation without redefining them. Override the
 * tokens on `.sat-panel` to reskin the whole panel.
 *
 * @package SatPanel
 */

/* ==========================================================================
   0. Fonts — bundled, never from a CDN
   ==========================================================================

   The panel used to get Vazirmatn for free: the active theme declared it and
   the panel inherited the theme's stylesheet. Isolating the panel page removed
   that stylesheet, and with it the font — the panel would have quietly dropped
   to Tahoma on production.

   So the plugin now carries its own copy. Self-hosted on purpose: a webfont
   fetched from a CDN is a third party watching every member who opens their
   wallet, and it stops working the moment that CDN is unreachable from Iran.
   ========================================================================== */

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

.sat-panel {
	/* Brand ramp — indigo/violet: trust plus momentum. */
	--sp-brand-50:  #eef1ff;
	--sp-brand-100: #e0e5ff;
	--sp-brand-200: #c6cfff;
	--sp-brand-300: #a3b0fd;
	--sp-brand-400: #8189f8;
	--sp-brand-500: #6366f1;
	--sp-brand-600: #5145e5;
	--sp-brand-700: #4536ca;
	--sp-brand-800: #382ea3;
	--sp-brand-900: #302c81;

	/* Semantic */
	--sp-success:      #059669;
	--sp-success-soft: #d1fae5;
	--sp-danger:       #dc2626;
	--sp-danger-soft:  #fee2e2;
	--sp-warning:      #d97706;
	--sp-warning-soft: #fef3c7;
	--sp-info:         #0284c7;
	--sp-info-soft:    #e0f2fe;

	/* Surfaces */
	--sp-bg:         #f6f7fb;
	--sp-surface:    #ffffff;
	--sp-surface-2:  #f9fafb;
	--sp-border:     #e5e7eb;
	--sp-border-str: #d1d5db;

	/* Text */
	--sp-text:   #111827;
	--sp-text-2: #4b5563;
	--sp-muted:  #9ca3af;

	/* Selected state — tokenised because the light tint is unreadable against
	   dark text tokens. Both dark paths below must override these. */
	--sp-selected-bg: var(--sp-brand-50);
	--sp-selected-fg: var(--sp-brand-700);

	/* Spacing scale (4px base) */
	--sp-1: 4px;
	--sp-2: 8px;
	--sp-3: 12px;
	--sp-4: 16px;
	--sp-5: 20px;
	--sp-6: 24px;
	--sp-8: 32px;
	--sp-10: 40px;
	--sp-12: 48px;

	/* Radii */
	--sp-r-sm: 8px;
	--sp-r-md: 12px;
	--sp-r-lg: 16px;
	--sp-r-xl: 22px;
	--sp-r-full: 999px;

	/* Elevation */
	--sp-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
	--sp-shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
	--sp-shadow-lg: 0 18px 44px -12px rgba(49, 46, 129, .28);

	--sp-ring: 0 0 0 4px rgba(99, 102, 241, .18);
	--sp-ease: cubic-bezier(.4, 0, .2, 1);

	--sp-font: "Vazirmatn", "IRANSansX", "IRANSans", "Shabnam", -apple-system,
		BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;

	direction: rtl;
	font-family: var(--sp-font);
	color: var(--sp-text);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
	.sat-panel:not([data-theme="light"]) {
		--sp-bg:         #0b1020;
		--sp-surface:    #141a2e;
		--sp-surface-2:  #1b2238;
		--sp-border:     #27304a;
		--sp-border-str: #384263;
		--sp-text:       #f3f4f6;
		--sp-text-2:     #c3c9d6;
		--sp-muted:      #8b93a7;
		--sp-success-soft: #052e22;
		--sp-danger-soft:  #3d1418;
		--sp-warning-soft: #3a2a08;
		--sp-info-soft:    #08293d;
		--sp-selected-bg: rgba(99, 102, 241, .18);
		--sp-selected-fg: var(--sp-brand-200);
		--sp-shadow-lg: 0 18px 44px -12px rgba(0, 0, 0, .6);
	}
}

/* Explicit dark theme must win even when the OS reports light, so it repeats
   every token the media query sets. */
.sat-panel[data-theme="dark"] {
	--sp-bg:         #0b1020;
	--sp-surface:    #141a2e;
	--sp-surface-2:  #1b2238;
	--sp-border:     #27304a;
	--sp-border-str: #384263;
	--sp-text:       #f3f4f6;
	--sp-text-2:     #c3c9d6;
	--sp-muted:      #8b93a7;
	--sp-success-soft: #052e22;
	--sp-danger-soft:  #3d1418;
	--sp-warning-soft: #3a2a08;
	--sp-info-soft:    #08293d;
	--sp-selected-bg: rgba(99, 102, 241, .18);
	--sp-selected-fg: var(--sp-brand-200);
	--sp-shadow-lg: 0 18px 44px -12px rgba(0, 0, 0, .6);
}

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

/* The browser's own [hidden] rule is `display: none` at UA priority, which any
   author `display` declaration outranks. Several components here set flex or
   grid, so without this an element the script marks hidden would stay visible —
   e.g. "remember me" appearing during registration. */
.sat-panel [hidden] {
	display: none !important;
}

/* ==========================================================================
   2. Shell
   ========================================================================== */

.sat-panel {
	position: relative;
	display: flex;
	justify-content: center;
	padding: var(--sp-8) var(--sp-4);
	isolation: isolate;
}

.sp-aurora {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	border-radius: var(--sp-r-xl);
}

.sp-aurora span {
	position: absolute;
	display: block;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .5;
}

.sp-aurora span:nth-child(1) {
	inset-inline-start: -60px;
	top: -70px;
	width: 300px;
	height: 300px;
	background: var(--sp-brand-400);
}

.sp-aurora span:nth-child(2) {
	inset-inline-end: -70px;
	bottom: -90px;
	width: 340px;
	height: 340px;
	background: #22d3ee;
	opacity: .32;
}

.sp-aurora span:nth-child(3) {
	inset-inline-start: 45%;
	top: 35%;
	width: 220px;
	height: 220px;
	background: #f0abfc;
	opacity: .22;
}

@media (prefers-reduced-motion: no-preference) {
	.sp-aurora span:nth-child(1) { animation: sp-drift 18s var(--sp-ease) infinite alternate; }
	.sp-aurora span:nth-child(2) { animation: sp-drift 22s var(--sp-ease) infinite alternate-reverse; }
}

@keyframes sp-drift {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(30px, 26px, 0) scale(1.12); }
}

.sp-card {
	position: relative;
	width: 100%;
	max-width: 470px;
	padding: var(--sp-8);
	background: var(--sp-surface);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-r-xl);
	box-shadow: var(--sp-shadow-lg);
}

@media (max-width: 520px) {
	.sat-panel { padding: var(--sp-4) var(--sp-3); }
	.sp-card   { padding: var(--sp-6) var(--sp-5); }
}

/* ==========================================================================
   3. Header + tabs
   ========================================================================== */

.sp-head { margin-bottom: var(--sp-6); text-align: center; }

.sp-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin-bottom: var(--sp-4);
	color: #fff;
	background: linear-gradient(135deg, var(--sp-brand-500), var(--sp-brand-700));
	border-radius: var(--sp-r-lg);
	box-shadow: 0 8px 20px -6px rgba(81, 69, 229, .55);
}

.sp-logo svg { width: 26px; height: 26px; }

.sp-title {
	margin: 0 0 var(--sp-1);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--sp-text);
}

.sp-sub {
	margin: 0;
	font-size: 14px;
	color: var(--sp-text-2);
}

.sp-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--sp-1);
	padding: var(--sp-1);
	margin-bottom: var(--sp-6);
	background: var(--sp-surface-2);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-r-md);
}

.sp-tab {
	padding: 10px var(--sp-3);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--sp-text-2);
	background: transparent;
	border: 0;
	border-radius: var(--sp-r-sm);
	cursor: pointer;
	transition: all .18s var(--sp-ease);
}

.sp-tab:hover { color: var(--sp-text); }

.sp-tab[aria-selected="true"] {
	color: var(--sp-selected-fg);
	background: var(--sp-surface);
	box-shadow: var(--sp-shadow-sm);
}

/* ==========================================================================
   4. Stepper
   ========================================================================== */

.sp-steps {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	margin-bottom: var(--sp-6);
}

.sp-step {
	flex: 1;
	height: 4px;
	background: var(--sp-border);
	border-radius: var(--sp-r-full);
	transition: background .3s var(--sp-ease);
}

.sp-step.is-done   { background: var(--sp-success); }
.sp-step.is-active { background: var(--sp-brand-500); }

/* ==========================================================================
   5. Form controls
   ========================================================================== */

.sp-field { margin-bottom: var(--sp-4); }

/* Two fields per row. Grid rather than inline-block: the latter counts the
   whitespace between elements in the line box, which pushed the pair to 100%+
   and wrapped them. */
.sp-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--sp-3);
}

@media (max-width: 420px) {
	.sp-row { grid-template-columns: 1fr; gap: 0; }
}

.sp-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sp-text-2);
}

.sp-req { color: var(--sp-danger); }

.sp-input {
	display: block;
	width: 100%;
	padding: 12px var(--sp-4);
	font-family: inherit;
	font-size: 15px;
	color: var(--sp-text);
	background: var(--sp-surface);
	border: 1.5px solid var(--sp-border-str);
	border-radius: var(--sp-r-md);
	outline: none;
	transition: border-color .18s var(--sp-ease), box-shadow .18s var(--sp-ease);
	-webkit-appearance: none;
	appearance: none;
}

.sp-input::placeholder { color: var(--sp-muted); }

.sp-input:focus {
	border-color: var(--sp-brand-500);
	box-shadow: var(--sp-ring);
}

.sp-input:disabled,
.sp-input[readonly] {
	color: var(--sp-text-2);
	background: var(--sp-surface-2);
	cursor: not-allowed;
}

.sp-input.is-invalid {
	border-color: var(--sp-danger);
	box-shadow: 0 0 0 4px rgba(220, 38, 38, .14);
}

.sp-input.is-valid { border-color: var(--sp-success); }

/* Phone input renders LTR digits inside an RTL form. */
.sp-input--tel {
	font-variant-numeric: tabular-nums;
	letter-spacing: .06em;
	direction: ltr;
	text-align: right;
}

.sp-hint {
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--sp-muted);
}

.sp-optional {
	font-weight: 400;
	color: var(--sp-muted);
}

/* Input + trailing affordance (state icon or reveal button) */
.sp-input-wrap { position: relative; }

.sp-input-wrap .sp-input { padding-inline-end: 44px; }

.sp-input-icon {
	position: absolute;
	inset-inline-end: 14px;
	top: 50%;
	display: none;
	width: 18px;
	height: 18px;
	transform: translateY(-50%);
	pointer-events: none;
}

.sp-input-icon::after {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	content: "";
}

.sp-input-icon[data-state="ok"],
.sp-input-icon[data-state="bad"],
.sp-input-icon[data-state="busy"] { display: block; }

.sp-input-icon[data-state="ok"]::after  { color: var(--sp-success); content: "\2713"; }
.sp-input-icon[data-state="bad"]::after { color: var(--sp-danger);  content: "\2715"; }

.sp-input-icon[data-state="busy"] {
	border: 2px solid var(--sp-border-str);
	border-top-color: var(--sp-brand-500);
	border-radius: 50%;
	animation: sp-spin .7s linear infinite;
}

.sp-reveal {
	position: absolute;
	inset-inline-end: 8px;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--sp-muted);
	background: none;
	border: 0;
	border-radius: var(--sp-r-sm);
	transform: translateY(-50%);
	cursor: pointer;
	transition: color .15s var(--sp-ease), background .15s var(--sp-ease);
}

.sp-reveal:hover { color: var(--sp-text-2); background: var(--sp-surface-2); }
.sp-reveal svg { width: 18px; height: 18px; }
.sp-reveal[aria-pressed="true"] { color: var(--sp-brand-600); }

/* Password strength meter */
.sp-meter {
	height: 4px;
	margin-top: 8px;
	overflow: hidden;
	background: var(--sp-border);
	border-radius: var(--sp-r-full);
}

.sp-meter span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--sp-danger);
	border-radius: var(--sp-r-full);
	transition: width .25s var(--sp-ease), background .25s var(--sp-ease);
}

.sp-meter[data-level="1"] span { width: 25%;  background: var(--sp-danger); }
.sp-meter[data-level="2"] span { width: 50%;  background: var(--sp-warning); }
.sp-meter[data-level="3"] span { width: 75%;  background: #0891b2; }
.sp-meter[data-level="4"] span { width: 100%; background: var(--sp-success); }

/* Grouped sections inside the profile step */
.sp-group {
	padding-bottom: var(--sp-2);
	margin-bottom: var(--sp-5);
	border-bottom: 1px solid var(--sp-border);
}

.sp-group:last-of-type { border-bottom: 0; }

.sp-group-title {
	margin: 0 0 var(--sp-3);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--sp-muted);
	text-transform: uppercase;
}

.sp-nested {
	padding-inline-start: var(--sp-3);
	margin-top: var(--sp-4);
	border-inline-start: 2px solid var(--sp-brand-200);
}

@media (prefers-color-scheme: dark) {
	.sat-panel:not([data-theme="light"]) .sp-nested { border-inline-start-color: var(--sp-brand-800); }
}

.sat-panel[data-theme="dark"] .sp-nested { border-inline-start-color: var(--sp-brand-800); }

/* Verified-phone banner on the profile step */
.sp-verified {
	display: flex;
	gap: var(--sp-3);
	align-items: center;
	padding: var(--sp-3) var(--sp-4);
	margin-bottom: var(--sp-5);
	background: var(--sp-success-soft);
	border: 1px solid rgba(5, 150, 105, .28);
	border-radius: var(--sp-r-md);
}

.sp-verified-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #fff;
	background: var(--sp-success);
	border-radius: 50%;
}

.sp-verified-icon svg { width: 16px; height: 16px; }

.sp-verified-body { flex: 1; min-width: 0; }

.sp-verified-body small {
	display: block;
	font-size: 11.5px;
	color: var(--sp-success);
}

.sp-verified-body b {
	display: block;
	font-size: 14.5px;
	font-variant-numeric: tabular-nums;
	color: var(--sp-text);
}

.sp-verified-edit {
	flex-shrink: 0;
	padding: 6px 12px;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--sp-success);
	background: transparent;
	border: 1px solid rgba(5, 150, 105, .4);
	border-radius: var(--sp-r-sm);
	cursor: pointer;
}

.sp-verified-edit:hover { background: rgba(5, 150, 105, .1); }

.sp-msg {
	display: none;
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 500;
}

.sp-msg.is-shown { display: block; }
.sp-msg--error   { color: var(--sp-danger); }
.sp-msg--ok      { color: var(--sp-success); }

/* ==========================================================================
   6. OTP digits
   ========================================================================== */

.sp-otp {
	display: flex;
	gap: var(--sp-2);
	justify-content: center;
	margin: var(--sp-5) 0 var(--sp-3);
	direction: ltr;
}

.sp-otp input {
	width: 52px;
	height: 60px;
	padding: 0;
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	color: var(--sp-text);
	text-align: center;
	background: var(--sp-surface-2);
	border: 1.5px solid var(--sp-border-str);
	border-radius: var(--sp-r-md);
	outline: none;
	transition: all .16s var(--sp-ease);
	-moz-appearance: textfield;
	appearance: textfield;
}

.sp-otp input::-webkit-outer-spin-button,
.sp-otp input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
}

.sp-otp input:focus {
	background: var(--sp-surface);
	border-color: var(--sp-brand-500);
	box-shadow: var(--sp-ring);
	transform: translateY(-2px);
}

.sp-otp input.is-filled {
	background: var(--sp-selected-bg);
	border-color: var(--sp-brand-400);
}

@media (max-width: 420px) {
	.sp-otp { gap: 6px; }
	.sp-otp input { width: 46px; height: 54px; font-size: 21px; }
}

.sp-otp.is-shaking { animation: sp-shake .4s var(--sp-ease); }

@keyframes sp-shake {
	0%, 100%     { transform: translateX(0); }
	20%, 60%     { transform: translateX(-7px); }
	40%, 80%     { transform: translateX(7px); }
}

.sp-resend {
	margin-top: var(--sp-2);
	font-size: 13px;
	text-align: center;
	color: var(--sp-text-2);
}

.sp-resend button {
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--sp-brand-600);
	background: none;
	border: 0;
	cursor: pointer;
}

.sp-resend button[disabled] {
	color: var(--sp-muted);
	cursor: default;
}

.sp-resend button:not([disabled]):hover { text-decoration: underline; }

/* ==========================================================================
   7. Checkbox / radio
   ========================================================================== */

.sp-check {
	display: flex;
	gap: var(--sp-3);
	align-items: flex-start;
	padding: var(--sp-3) var(--sp-4);
	font-size: 14px;
	background: var(--sp-surface-2);
	border: 1.5px solid var(--sp-border);
	border-radius: var(--sp-r-md);
	cursor: pointer;
	transition: all .18s var(--sp-ease);
}

.sp-check:hover { border-color: var(--sp-brand-300); }

.sp-check input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--sp-brand-600);
	cursor: pointer;
}

.sp-check-body strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--sp-text);
}

.sp-check-body span {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--sp-text-2);
}

/* Without this the terms link falls back to the UA's dark blue, which is
   unreadable on the dark surface. */
.sp-check-body a {
	color: var(--sp-brand-500);
	text-decoration: underline;
}

.sp-check-body a:hover { color: var(--sp-brand-400); }

.sp-check.is-on {
	background: var(--sp-selected-bg);
	border-color: var(--sp-brand-400);
}

.sp-check--tight {
	padding: var(--sp-3);
	margin-bottom: var(--sp-2);
	background: transparent;
	border-color: transparent;
}

.sp-check--tight:hover { border-color: var(--sp-border); }

.sp-teams {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--sp-3);
}

.sp-team {
	position: relative;
	padding: var(--sp-4) var(--sp-3);
	text-align: center;
	background: var(--sp-surface-2);
	border: 1.5px solid var(--sp-border);
	border-radius: var(--sp-r-md);
	cursor: pointer;
	transition: all .18s var(--sp-ease);
}

.sp-team input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sp-team strong {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
}

.sp-team small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--sp-text-2);
}

.sp-team:has(input:checked) {
	color: var(--sp-selected-fg);
	background: var(--sp-selected-bg);
	border-color: var(--sp-brand-500);
	box-shadow: var(--sp-ring);
}

/* :has() is widely supported but not universal; keyboard focus still shows the
   selection so the choice is never invisible. */
.sp-team:focus-within {
	border-color: var(--sp-brand-500);
	box-shadow: var(--sp-ring);
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.sp-btn {
	position: relative;
	display: inline-flex;
	gap: var(--sp-2);
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 13px var(--sp-5);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	border: 0;
	border-radius: var(--sp-r-md);
	cursor: pointer;
	transition: transform .14s var(--sp-ease), box-shadow .18s var(--sp-ease), opacity .18s var(--sp-ease);
}

.sp-btn:active:not([disabled]) { transform: translateY(1px); }

.sp-btn[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

/* Same shape as the panel's primary button, and for the same reason: the text
   colour is a literal, so a `background` shorthand whose gradient fails to
   resolve leaves white-on-white. Here it matters most — this is the sign-in
   screen, and a button nobody can see is a locked door with no way around it.
   Solid colour and gradient are separate properties so the colour survives on
   its own. */
.sp-btn--primary {
	color: #fff;
	background-color: var(--sp-brand-600, #5145e5);
	background-image: linear-gradient(135deg, var(--sp-brand-500), var(--sp-brand-700));
	box-shadow: 0 8px 18px -6px rgba(81, 69, 229, .5);
}

.sp-btn--primary:hover:not([disabled]) {
	box-shadow: 0 12px 24px -8px rgba(81, 69, 229, .62);
}

.sp-btn--ghost {
	color: var(--sp-text-2);
	background: var(--sp-surface-2);
	border: 1.5px solid var(--sp-border);
}

.sp-btn--ghost:hover:not([disabled]) {
	color: var(--sp-text);
	border-color: var(--sp-border-str);
}

.sp-btn--link {
	width: auto;
	padding: 0;
	font-size: 13.5px;
	color: var(--sp-brand-600);
	background: none;
}

.sp-btn--link:hover { text-decoration: underline; }

.sp-actions {
	display: flex;
	gap: var(--sp-3);
	margin-top: var(--sp-5);
}

.sp-actions .sp-btn { flex: 1; }

.sp-btn.is-busy { color: transparent !important; }

.sp-btn.is-busy::after {
	position: absolute;
	top: 50%;
	inset-inline-start: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	content: "";
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sp-spin .7s linear infinite;
}

.sp-btn--ghost.is-busy::after {
	border-color: rgba(99, 102, 241, .3);
	border-top-color: var(--sp-brand-600);
}

@keyframes sp-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   9. Alerts, steps, notices
   ========================================================================== */

.sp-alert {
	display: none;
	gap: var(--sp-3);
	align-items: flex-start;
	padding: var(--sp-3) var(--sp-4);
	margin-bottom: var(--sp-4);
	font-size: 13.5px;
	border-radius: var(--sp-r-md);
	border: 1px solid transparent;
}

.sp-alert.is-shown { display: flex; }

.sp-alert--error   { color: var(--sp-danger);  background: var(--sp-danger-soft);  border-color: rgba(220, 38, 38, .25); }
.sp-alert--ok      { color: var(--sp-success); background: var(--sp-success-soft); border-color: rgba(5, 150, 105, .25); }
.sp-alert--info    { color: var(--sp-info);    background: var(--sp-info-soft);    border-color: rgba(2, 132, 199, .25); }
.sp-alert--warn    { color: var(--sp-warning); background: var(--sp-warning-soft); border-color: rgba(217, 119, 6, .25); }

.sp-pane { display: none; }
.sp-pane.is-active { display: block; animation: sp-fade .3s var(--sp-ease); }

@keyframes sp-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

.sp-foot {
	padding-top: var(--sp-5);
	margin-top: var(--sp-6);
	font-size: 13.5px;
	text-align: center;
	color: var(--sp-text-2);
	border-top: 1px solid var(--sp-border);
}

.sp-foot a,
.sp-foot button {
	font-weight: 600;
	color: var(--sp-brand-600);
	text-decoration: none;
	background: none;
	border: 0;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.sp-foot a:hover,
.sp-foot button:hover { text-decoration: underline; }

.sp-phone-echo {
	display: flex;
	gap: var(--sp-2);
	align-items: center;
	justify-content: center;
	margin-bottom: var(--sp-2);
	font-size: 14px;
	color: var(--sp-text-2);
}

.sp-phone-echo b {
	direction: ltr;
	font-variant-numeric: tabular-nums;
	color: var(--sp-text);
}

/* Notice card (already-signed-in, upgrade success, gate) */
.sp-notice { text-align: center; }

.sp-notice-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: var(--sp-4);
	border-radius: var(--sp-r-full);
}

.sp-notice-icon svg { width: 28px; height: 28px; }

.sp-notice-icon--success { color: var(--sp-success); background: var(--sp-success-soft); }
.sp-notice-icon--info    { color: var(--sp-info);    background: var(--sp-info-soft); }
.sp-notice-icon--warn    { color: var(--sp-warning); background: var(--sp-warning-soft); }

.sp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Blocked-account window (Sat_Panel_Block): page-load notice and panel overlay */
.sp-blocked {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, .55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	font-family: var(--sp-font);
	direction: rtl;
}

.sp-blocked__card {
	width: 100%;
	max-width: 420px;
	padding: 28px 24px;
	text-align: center;
	color: var(--sp-text);
	background: var(--sp-surface);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-r-xl);
	box-shadow: var(--sp-shadow-lg);
}

.sp-blocked__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 12px;
	color: var(--sp-danger);
	background: var(--sp-danger-soft);
	border-radius: var(--sp-r-full);
}

.sp-blocked__icon svg { width: 28px; height: 28px; }
.sp-blocked__title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; color: var(--sp-text); }
.sp-blocked__text { margin: 0 0 20px; line-height: 1.9; color: var(--sp-text); }
.sp-blocked__ok { display: inline-flex; min-width: 140px; justify-content: center; text-decoration: none; }
