/* ==========================================================================
   پنل کاربری ققنوس — توکن‌های طراحی و اجزای مشترک
   سبک: Soft-UI نئومورفیک (روشن/تیره) + اکسنت‌های رنگی
   ========================================================================== */

@font-face {
	font-family: "PhxAzarMehr";
	src: url("../fonts/AzarMehr-FD-VF.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "PhxAzarMehrStatic";
	src: url("../fonts/AzarMehr-FD-Medium.woff2") format("woff2");
	font-weight: 100 600;
	font-display: swap;
}
@font-face {
	font-family: "PhxAzarMehrStatic";
	src: url("../fonts/AzarMehr-FD-Bold.woff2") format("woff2");
	font-weight: 700 900;
	font-display: swap;
}

/* ---------- توکن‌ها: حالت روشن ---------- */
.phx-root,
.phx-html {
	--phx-font: "PhxAzarMehr", "PhxAzarMehrStatic", "AzarMehr", "Vazirmatn", Tahoma, sans-serif;
	--phx-bg: #e6e7eb;
	--phx-surface: #e6e7eb;
	--phx-surface-2: #eceef2;
	--phx-surface-3: #f3f4f7;
	--phx-ink: #262b34;
	--phx-ink-2: #545b69;
	--phx-ink-3: #868d99;
	--phx-line: rgba(38, 48, 68, .09);
	--phx-line-2: rgba(38, 48, 68, .14);
	--phx-field-bg: var(--phx-surface);
	--phx-field-line: rgba(38, 48, 68, .16);
	--phx-field-line-2: rgba(38, 48, 68, .28);
	--phx-sh-d: rgba(160, 169, 188, .6);
	--phx-sh-l: rgba(255, 255, 255, .92);
	--phx-raise: 9px 9px 20px var(--phx-sh-d), -9px -9px 20px var(--phx-sh-l);
	--phx-raise-sm: 5px 5px 11px var(--phx-sh-d), -5px -5px 11px var(--phx-sh-l);
	--phx-raise-xs: 3px 3px 6px var(--phx-sh-d), -3px -3px 6px var(--phx-sh-l);
	--phx-inset: inset 4px 4px 9px var(--phx-sh-d), inset -4px -4px 9px var(--phx-sh-l);
	--phx-inset-sm: inset 2px 2px 5px var(--phx-sh-d), inset -2px -2px 5px var(--phx-sh-l);
	--phx-float: 0 18px 50px -12px rgba(30, 36, 50, .28);
	--phx-radius-xl: 28px;
	--phx-radius: 22px;
	--phx-radius-md: 16px;
	--phx-radius-sm: 12px;
	--phx-radius-xs: 9px;
	--phx-success: #15924a;
	--phx-success-soft: rgba(22, 163, 74, .12);
	--phx-warning: #b86a05;
	--phx-warning-soft: rgba(217, 119, 6, .14);
	--phx-danger: #d42a2a;
	--phx-danger-soft: rgba(220, 38, 38, .12);
	--phx-info: #2563eb;
	--phx-info-soft: rgba(37, 99, 235, .12);
	--phx-a1: #e5383b;
	--phx-a2: #a4161a;
	--phx-a-rgb: 229, 56, 59;
	--phx-grad: linear-gradient(135deg, var(--phx-a1), var(--phx-a2));
	--phx-a-soft: rgba(var(--phx-a-rgb), .12);
	--phx-a-ring: rgba(var(--phx-a-rgb), .55);
	--phx-glare: rgba(255, 255, 255, .55);
	--phx-ease: cubic-bezier(.22, .8, .24, 1);
	--phx-spring: cubic-bezier(.34, 1.4, .5, 1);
	color-scheme: light;
}

/* ---------- حالت تیره ---------- */
.phx-root[data-mode="dark"],
.phx-html[data-mode="dark"] {
	--phx-bg: #1d2026;
	--phx-surface: #1d2026;
	--phx-surface-2: #22262d;
	--phx-surface-3: #282c34;
	--phx-ink: #e9ebef;
	--phx-ink-2: #aab0bb;
	--phx-ink-3: #7c8390;
	--phx-line: rgba(255, 255, 255, .07);
	--phx-line-2: rgba(255, 255, 255, .11);
	--phx-field-bg: #191c21;
	--phx-field-line: rgba(255, 255, 255, .13);
	--phx-field-line-2: rgba(255, 255, 255, .22);
	--phx-sh-d: rgba(0, 0, 0, .58);
	--phx-sh-l: rgba(255, 255, 255, .045);
	--phx-float: 0 22px 60px -12px rgba(0, 0, 0, .7);
	--phx-success: #3ccf78;
	--phx-warning: #f5b544;
	--phx-danger: #ff6464;
	--phx-info: #6ea0ff;
	--phx-glare: rgba(255, 255, 255, .06);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	.phx-root[data-mode="system"],
	.phx-html[data-mode="system"] {
		--phx-bg: #1d2026;
		--phx-surface: #1d2026;
		--phx-surface-2: #22262d;
		--phx-surface-3: #282c34;
		--phx-ink: #e9ebef;
		--phx-ink-2: #aab0bb;
		--phx-ink-3: #7c8390;
		--phx-line: rgba(255, 255, 255, .07);
		--phx-line-2: rgba(255, 255, 255, .11);
		--phx-field-bg: #191c21;
		--phx-field-line: rgba(255, 255, 255, .13);
		--phx-field-line-2: rgba(255, 255, 255, .22);
		--phx-sh-d: rgba(0, 0, 0, .58);
		--phx-sh-l: rgba(255, 255, 255, .045);
		--phx-float: 0 22px 60px -12px rgba(0, 0, 0, .7);
		--phx-success: #3ccf78;
		--phx-warning: #f5b544;
		--phx-danger: #ff6464;
		--phx-info: #6ea0ff;
		--phx-glare: rgba(255, 255, 255, .06);
		color-scheme: dark;
	}
}

/* ---------- پایه ---------- */
html.phx-html,
html.phx-html body {
	margin: 0;
	padding: 0;
	background: var(--phx-bg);
	min-height: 100%;
}
html.phx-html body.admin-bar { min-height: calc(100% - 32px); }

.phx-root {
	font-family: var(--phx-font);
	font-size: 15px;
	line-height: 1.75;
	color: var(--phx-ink);
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
	font-feature-settings: "ss01";
}
.phx-root *,
.phx-root *::before,
.phx-root *::after { box-sizing: border-box; }

.phx-root :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }
.phx-root :where(h1, h2, h3, h4, h5, h6) { font-family: var(--phx-font); color: var(--phx-ink); line-height: 1.4; font-weight: 800; letter-spacing: 0; text-transform: none; }
.phx-root :where(ul, ol) { list-style: none; }
.phx-root :where(a) { color: inherit; text-decoration: none; }
.phx-root :where(img, svg, video) { max-width: 100%; display: block; }
.phx-root :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.phx-root :where(button) { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; }
.phx-root :where(table) { border-collapse: collapse; width: 100%; }
.phx-root ::selection { background: rgba(var(--phx-a-rgb), .25); }
.phx-root :focus { outline: none; }
.phx-root :focus-visible { outline: 2px solid var(--phx-a-ring); outline-offset: 3px; border-radius: 10px; }

.phx-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.phx-hp { position: absolute !important; right: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.phx-i {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
	display: inline-block;
	vertical-align: middle;
}

/* ---------- لوگوی روشن/تیره (ورود و پنل) ---------- */
.phx-root .phx-logo--dark { display: none; }
.phx-root[data-mode="dark"] .phx-logo--light { display: none; }
.phx-root[data-mode="dark"] .phx-logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
	.phx-root[data-mode="system"] .phx-logo--light { display: none; }
	.phx-root[data-mode="system"] .phx-logo--dark { display: block; }
}

/* ---------- دکمه‌ی حالت روشن/تیره ---------- */
.phx-root .phx-mode-toggle__sun { display: none; }
.phx-root[data-mode="dark"] .phx-mode-toggle__sun { display: block; }
.phx-root[data-mode="dark"] .phx-mode-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
	.phx-root[data-mode="system"] .phx-mode-toggle__sun { display: block; }
	.phx-root[data-mode="system"] .phx-mode-toggle__moon { display: none; }
}
.phx-root .phx-mode-toggle .phx-i { animation: phx-pop-rotate .6s var(--phx-spring); }
@keyframes phx-pop-rotate { from { transform: rotate(-90deg) scale(.4); opacity: 0; } }

/* ---------- فیلدها ---------- */
.phx-root .phx-field { position: relative; }
.phx-root .phx-input,
.phx-root .phx-select,
.phx-root .phx-textarea {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 46px 0 16px;
	border: 0;
	border-radius: var(--phx-radius-sm);
	background: var(--phx-surface);
	box-shadow: var(--phx-inset);
	color: var(--phx-ink);
	font-size: 14.5px;
	font-weight: 500;
	line-height: 50px;
	transition: box-shadow .3s var(--phx-ease), background-color .3s;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}
.phx-root .phx-textarea { height: auto; min-height: 130px; line-height: 1.9; padding: 14px 16px; resize: vertical; }
.phx-root .phx-input::placeholder,
.phx-root .phx-textarea::placeholder { color: var(--phx-ink-3); opacity: 1; font-weight: 400; }
.phx-root .phx-input[dir="ltr"] { text-align: right; }
.phx-root .phx-input[dir="ltr"]:not(:placeholder-shown) { text-align: left; direction: ltr; }
.phx-root .phx-input:focus,
.phx-root .phx-select:focus,
.phx-root .phx-textarea:focus {
	box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-a-ring);
}
/* در تنظیمات و پنل، لبه‌ی فیلدها با یک خط نازک مشخص است (به‌ویژه در حالت تیره که سایه‌ی
   فرورفته به‌تنهایی دیده نمی‌شود)؛ با box-shadow تا اندازه‌ی فیلدها تغییر نکند. */
.phx-root.phx-admin .phx-input,
.phx-root.phx-admin .phx-select,
.phx-root.phx-admin .phx-textarea,
.phx-root.phx-app .phx-input,
.phx-root.phx-app .phx-select,
.phx-root.phx-app .phx-textarea {
	background-color: var(--phx-field-bg);
	box-shadow: var(--phx-inset-sm), 0 0 0 1px var(--phx-field-line);
}
.phx-root.phx-admin .phx-input:hover,
.phx-root.phx-admin .phx-select:hover,
.phx-root.phx-admin .phx-textarea:hover,
.phx-root.phx-app .phx-input:hover,
.phx-root.phx-app .phx-select:hover,
.phx-root.phx-app .phx-textarea:hover { box-shadow: var(--phx-inset-sm), 0 0 0 1px var(--phx-field-line-2); }
.phx-root.phx-admin .phx-input:focus,
.phx-root.phx-admin .phx-select:focus,
.phx-root.phx-admin .phx-textarea:focus,
.phx-root.phx-app .phx-input:focus,
.phx-root.phx-app .phx-select:focus,
.phx-root.phx-app .phx-textarea:focus { box-shadow: var(--phx-inset-sm), 0 0 0 1.6px var(--phx-a-ring); }
.phx-root .phx-field__icon {
	position: absolute;
	top: 50%;
	right: 16px;
	width: 19px;
	height: 19px;
	transform: translateY(-50%);
	color: var(--phx-ink-3);
	pointer-events: none;
	transition: color .3s, transform .3s var(--phx-spring);
}
.phx-root .phx-field:focus-within .phx-field__icon { color: var(--phx-a1); transform: translateY(-50%) scale(1.08); }
.phx-root .phx-field.is-invalid .phx-input,
.phx-root .phx-field.is-invalid .phx-select { box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-danger); }
.phx-root .phx-field.is-invalid .phx-field__icon { color: var(--phx-danger); }
.phx-root .phx-field__eye {
	position: absolute;
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	color: var(--phx-ink-3);
	transition: color .2s;
}
.phx-root .phx-field__eye:hover { color: var(--phx-ink); }
.phx-root .phx-field__eye .phx-i { width: 18px; height: 18px; }
.phx-root .phx-field--plain .phx-input { padding-right: 16px; }

.phx-root .phx-select {
	padding: 0 14px 0 34px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a909c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: 13px 50%;
	background-size: 14px 14px;
	background-repeat: no-repeat;
}
.phx-root .phx-select option { background: var(--phx-surface-2); color: var(--phx-ink); }

.phx-root .phx-label {
	display: block;
	margin: 0 4px 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--phx-ink-2);
}
.phx-root .phx-help { margin: 7px 4px 0; font-size: 12px; color: var(--phx-ink-3); line-height: 1.7; }

/* ---------- دکمه‌ها ---------- */
.phx-root .phx-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 50px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--phx-radius-sm);
	background: var(--phx-surface);
	box-shadow: var(--phx-raise-sm);
	color: var(--phx-ink-2);
	font-size: 14.5px;
	font-weight: 800;
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	isolation: isolate;
	transition: color .35s, box-shadow .35s var(--phx-ease), transform .2s var(--phx-ease);
	cursor: pointer;
	text-decoration: none;
}
.phx-root .phx-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--phx-grad);
	opacity: 0;
	transition: opacity .35s var(--phx-ease);
}
.phx-root .phx-btn:hover,
.phx-root .phx-btn:focus-visible,
.phx-root .phx-btn--primary {
	color: #fff;
	box-shadow: 0 12px 26px -8px rgba(var(--phx-a-rgb), .55), var(--phx-raise-xs);
}
.phx-root .phx-btn:hover::before,
.phx-root .phx-btn:focus-visible::before,
.phx-root .phx-btn--primary::before { opacity: 1; }
.phx-root .phx-btn:active { transform: scale(.975); }
.phx-root .phx-btn[disabled],
.phx-root .phx-btn.is-loading { pointer-events: none; }
.phx-root .phx-btn[disabled]:not(.is-loading) { opacity: .55; }
.phx-root .phx-btn .phx-i { width: 18px; height: 18px; }
.phx-root .phx-btn--block { display: flex; width: 100%; }
.phx-root .phx-btn--sm { height: 40px; padding: 0 16px; font-size: 13px; border-radius: 11px; }
.phx-root .phx-btn--xs { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.phx-root .phx-btn--xs .phx-i { width: 15px; height: 15px; }
.phx-root .phx-btn--icon { width: 44px; padding: 0; }
.phx-root .phx-btn--ghost { box-shadow: var(--phx-raise-xs); }
.phx-root .phx-btn--flat { box-shadow: none; background: transparent; }
.phx-root .phx-btn--flat:hover { box-shadow: none; }
.phx-root .phx-btn--danger::before { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.phx-root .phx-btn--danger:hover { box-shadow: 0 12px 26px -8px rgba(220, 38, 38, .5), var(--phx-raise-xs); }
.phx-root .phx-btn.is-loading { color: transparent !important; }
.phx-root .phx-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	top: calc(50% - 10px);
	left: calc(50% - 10px);
	border-radius: 50%;
	border: 2.4px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	animation: phx-spin .7s linear infinite;
}
.phx-root .phx-btn.is-loading::before { opacity: 1; }
@keyframes phx-spin { to { transform: rotate(360deg); } }

/* ---------- لینک‌ها ---------- */
.phx-root .phx-link {
	color: var(--phx-a1);
	font-weight: 800;
	transition: opacity .2s;
	cursor: pointer;
}
.phx-root .phx-link:hover { opacity: .8; }
.phx-root .phx-link-muted {
	color: var(--phx-ink-2);
	font-size: 12.5px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: color .2s;
	cursor: pointer;
}
.phx-root .phx-link-muted:hover { color: var(--phx-a1); }
.phx-root .phx-link-muted .phx-i { width: 15px; height: 15px; }

/* ---------- سوییچ (مثل ویدیو) ---------- */
.phx-root .phx-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--phx-ink-2);
}
.phx-root .phx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.phx-root .phx-switch__track {
	position: relative;
	width: 42px;
	height: 22px;
	flex-shrink: 0;
	border-radius: 30px;
	background: var(--phx-surface);
	box-shadow: var(--phx-inset-sm);
	transition: background .35s;
}
.phx-root .phx-switch__knob {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--phx-surface-3);
	box-shadow: 2px 2px 4px var(--phx-sh-d), -1px -1px 3px var(--phx-sh-l);
	transition: transform .45s var(--phx-spring), background .35s;
}
.phx-root .phx-switch input:checked + .phx-switch__track { background: rgba(var(--phx-a-rgb), .14); }
.phx-root .phx-switch input:checked + .phx-switch__track .phx-switch__knob {
	transform: translateX(-20px);
	background: var(--phx-grad);
	box-shadow: 0 2px 6px rgba(var(--phx-a-rgb), .5);
}
.phx-root .phx-switch input:focus-visible + .phx-switch__track { outline: 2px solid var(--phx-a-ring); outline-offset: 2px; }

/* ---------- چک‌باکس ---------- */
.phx-root .phx-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	color: var(--phx-ink-2);
	cursor: pointer;
}
.phx-root .phx-check input { position: absolute; opacity: 0; pointer-events: none; }
.phx-root .phx-check__box {
	width: 20px;
	height: 20px;
	border-radius: 6px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--phx-surface);
	box-shadow: var(--phx-inset-sm);
	color: transparent;
	transition: all .25s var(--phx-ease);
}
.phx-root .phx-check__box .phx-i { width: 14px; height: 14px; stroke-width: 3; }
.phx-root .phx-check input:checked + .phx-check__box { background: var(--phx-grad); color: #fff; box-shadow: 0 3px 8px rgba(var(--phx-a-rgb), .45); }
.phx-root .phx-check a { color: var(--phx-a1); font-weight: 700; }

/* ---------- سوییچ دوحالته (segmented) ---------- */
.phx-root .phx-seg {
	position: relative;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	padding: 5px;
	border-radius: 14px;
	background: var(--phx-surface);
	box-shadow: var(--phx-inset-sm);
}
.phx-root .phx-seg__btn {
	position: relative;
	z-index: 1;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--phx-ink-3);
	border-radius: 10px;
	transition: color .3s;
}
.phx-root .phx-seg__btn .phx-i { width: 16px; height: 16px; }
.phx-root .phx-seg__btn.is-active { color: var(--phx-a1); }
.phx-root .phx-seg__pill {
	position: absolute;
	top: 5px;
	bottom: 5px;
	right: 5px;
	width: calc((100% - 10px) / var(--n, 2));
	border-radius: 10px;
	background: var(--phx-surface-2);
	box-shadow: var(--phx-raise-xs);
	transform: translateX(calc(var(--i, 0) * -100%));
	transition: transform .5s var(--phx-spring);
}

/* ---------- نوار قدرت رمز ---------- */
.phx-root .phx-meter {
	height: 6px;
	border-radius: 6px;
	background: var(--phx-surface);
	box-shadow: var(--phx-inset-sm);
	overflow: hidden;
	margin-top: -4px;
}
.phx-root .phx-meter span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--phx-danger);
	transition: width .45s var(--phx-ease), background .3s;
}
.phx-root .phx-meter[data-level="1"] span { width: 25%; background: var(--phx-danger); }
.phx-root .phx-meter[data-level="2"] span { width: 50%; background: var(--phx-warning); }
.phx-root .phx-meter[data-level="3"] span { width: 75%; background: #65a30d; }
.phx-root .phx-meter[data-level="4"] span { width: 100%; background: var(--phx-success); }

/* ---------- کد یکبارمصرف ---------- */
.phx-root .phx-otp {
	position: relative;
	display: flex;
	justify-content: center;
	gap: 10px;
	direction: ltr;
}
/* یک فیلد واقعی روی خانه‌ها: تایپ سریع، چسباندن و پرکردن خودکار پیامک را بی‌نقص پشتیبانی می‌کند. */
.phx-root .phx-otp__input {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: transparent;
	caret-color: transparent;
	font-size: 16px;
	opacity: 0;
	cursor: text;
	outline: none;
	box-shadow: none;
}
.phx-root .phx-otp__box {
	position: relative;
	width: 48px;
	height: 56px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	font-size: 23px;
	font-weight: 800;
	color: var(--phx-ink);
	background: var(--phx-surface);
	box-shadow: var(--phx-inset);
	transition: box-shadow .25s, transform .3s var(--phx-spring), color .2s;
}
.phx-root .phx-otp__box.is-filled { color: var(--phx-a1); transform: translateY(-1px); }
.phx-root .phx-otp.is-focus .phx-otp__box.is-current {
	box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-a-ring);
	transform: translateY(-2px);
}
.phx-root .phx-otp.is-focus .phx-otp__box.is-current::after {
	content: "";
	width: 2px;
	height: 24px;
	border-radius: 2px;
	background: var(--phx-a1);
	animation: phx-caret 1s steps(1) infinite;
}
@keyframes phx-caret { 50% { opacity: 0; } }
.phx-root .phx-otp.is-invalid .phx-otp__box { box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-danger); }
.phx-root .phx-otp.is-success .phx-otp__box { box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-success); color: var(--phx-success); }

/* ---------- تاریخ سه‌فیلدی ---------- */
.phx-root .phx-date { border: 0; margin: 0; padding: 0; min-width: 0; }
.phx-root .phx-date__legend {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	margin: 0 4px 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--phx-ink-2);
}
.phx-root .phx-date__legend .phx-i { width: 16px; height: 16px; color: var(--phx-a1); }
.phx-root .phx-date__fields {
	display: grid;
	grid-template-columns: .9fr 1.35fr 1.05fr;
	gap: 8px;
}
.phx-root .phx-date .phx-select { height: 46px; line-height: 46px; font-size: 13.5px; padding-right: 12px; }
.phx-root .phx-date.is-invalid .phx-select { box-shadow: var(--phx-inset), 0 0 0 1.6px var(--phx-danger); }

/* ---------- پیام خطا ---------- */
.phx-root .phx-msg {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--phx-danger);
	text-align: center;
	min-height: 0;
	line-height: 1.7;
}
.phx-root .phx-msg:empty { display: none; }
.phx-root .phx-msg.is-ok { color: var(--phx-success); }

@keyframes phx-shake {
	10%, 90% { transform: translateX(-1px); }
	20%, 80% { transform: translateX(3px); }
	30%, 50%, 70% { transform: translateX(-5px); }
	40%, 60% { transform: translateX(5px); }
}
.phx-root .is-shake { animation: phx-shake .5s both; }

/* ---------- چیپ وضعیت ---------- */
.phx-root .phx-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 11px;
	border-radius: 30px;
	font-size: 11.5px;
	font-weight: 800;
	white-space: nowrap;
	background: var(--phx-line);
	color: var(--phx-ink-2);
}
.phx-root .phx-chip::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.phx-root .phx-chip--plain::before { display: none; }
.phx-root .phx-chip--success { background: var(--phx-success-soft); color: var(--phx-success); }
.phx-root .phx-chip--warning { background: var(--phx-warning-soft); color: var(--phx-warning); }
.phx-root .phx-chip--danger { background: var(--phx-danger-soft); color: var(--phx-danger); }
.phx-root .phx-chip--info { background: var(--phx-info-soft); color: var(--phx-info); }
.phx-root .phx-chip--accent { background: var(--phx-a-soft); color: var(--phx-a1); }

/* ---------- اعلان شناور (toast) ---------- */
.phx-toasts {
	position: fixed;
	z-index: 100000;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	display: grid;
	gap: 10px;
	width: min(420px, calc(100vw - 32px));
	pointer-events: none;
}
.phx-toast {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 16px;
	border-radius: 16px;
	background: var(--phx-surface-2);
	color: var(--phx-ink);
	box-shadow: var(--phx-float);
	font-size: 13.5px;
	font-weight: 600;
	pointer-events: auto;
	border: 1px solid var(--phx-line);
	animation: phx-toast-in .5s var(--phx-spring) both;
}
.phx-toast.is-out { animation: phx-toast-out .35s var(--phx-ease) both; }
.phx-toast__icon {
	width: 30px;
	height: 30px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--phx-success-soft);
	color: var(--phx-success);
}
.phx-toast--error .phx-toast__icon { background: var(--phx-danger-soft); color: var(--phx-danger); }
.phx-toast--info .phx-toast__icon { background: var(--phx-a-soft); color: var(--phx-a1); }
.phx-toast__icon .phx-i { width: 17px; height: 17px; }
@keyframes phx-toast-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes phx-toast-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ---------- کانفتی ---------- */
.phx-confetti {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	z-index: 99999;
}

/* جلوگیری از بزرگ‌نمایی خودکار iOS روی فیلدهای کوچک‌تر از ۱۶px */
@media (max-width: 600px) and (hover: none) {
	.phx-root .phx-input,
	.phx-root .phx-select,
	.phx-root .phx-textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.phx-root *,
	.phx-root *::before,
	.phx-root *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
