/* ==========================================================================
 * BoxAPI Plan Manager — Frontend Styles
 * طراحی ساده، تمیز و کاربرپسند؛ از فونت پیش‌فرض قالب سایت پیروی می‌کند.
 * ========================================================================== */

.bpm-wrap {
	--bpm-surface: #ffffff;
	--bpm-surface-muted: #f6f7fb;
	--bpm-border: #e6e8f0;
	--bpm-ink: #16182c;
	--bpm-ink-muted: #64677e;
	--bpm-accent: #54b9f2;
	--bpm-accent-strong: #2a9bdc;
	--bpm-accent-ink: #05314a;
	--bpm-accent-soft: #e8f5fe;
	--bpm-success: #157f3c;
	--bpm-success-soft: #e7f6ec;
	--bpm-danger: #b42318;
	--bpm-danger-soft: #fdedec;
	--bpm-warning: #92400e;
	--bpm-warning-soft: #fef3e2;
	--bpm-radius: 14px;
	--bpm-radius-sm: 9px;
	--bpm-shadow: 0 1px 2px rgba(20, 22, 44, .04), 0 6px 18px -10px rgba(20, 22, 44, .14);
	--bpm-font: inherit;

	direction: rtl;
	text-align: right;
	font-family: var(--bpm-font);
	color: var(--bpm-ink);
	max-width: 560px;
	margin: 0 auto;
	font-variant-numeric: tabular-nums;
}

.bpm-wrap * {
	box-sizing: border-box;
}

.bpm-wrap :focus-visible {
	outline: 2px solid var(--bpm-accent);
	outline-offset: 2px;
}


.bpm-notice.bpm-notice-warn {
    margin-bottom: 15px;
}

/* -------------------------------- موجودی کیف پول -------------------------------- */
.bpm-wallet-bar {
	background: var(--bpm-surface);
	border: 1px solid var(--bpm-border);
	border-radius: var(--bpm-radius);
	padding: 14px 18px;
	margin-bottom: 14px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.bpm-wallet-label {
	font-size: 13px;
	color: var(--bpm-ink-muted);
}

.bpm-wallet-figure {
	display: flex;
	align-items: baseline;
	gap: 5px;
}

.bpm-wallet-balance {
	font-weight: 700;
	font-size: 19px;
	color: var(--bpm-ink);
}

.bpm-wallet-unit {
	font-size: 12.5px;
	color: var(--bpm-ink-muted);
}

/* -------------------------------- انتخاب نوع سرویس -------------------------------- */
.bpm-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}

.bpm-tab-btn {
	background: var(--bpm-surface);
	border: 1.5px solid var(--bpm-border);
	border-radius: var(--bpm-radius);
	padding: 13px 14px;
	font-family: inherit;
	cursor: pointer;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	transition: border-color .15s ease;
}

.bpm-tab-btn:hover {
	border-color: var(--bpm-accent);
	background: var(--bpm-accent-soft);
}

.bpm-tab-btn.is-active {
	border-color: var(--bpm-accent);
	background: var(--bpm-accent-soft);
}

.bpm-api-card-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--bpm-ink);
}

.bpm-api-card-status {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--bpm-surface-muted);
	color: var(--bpm-ink-muted);
}

.bpm-api-card-status.is-active-plan {
	background: var(--bpm-success-soft);
	color: var(--bpm-success);
}

@media (max-width: 420px) {
	.bpm-tabs {
		grid-template-columns: 1fr;
	}
}

.bpm-tab-panel {
	display: none;
}

.bpm-tab-panel.is-active {
	display: block;
}

/* -------------------------------- کارت‌ها -------------------------------- */
.bpm-tile {
	background: var(--bpm-surface);
	border: 1px solid var(--bpm-border);
	border-radius: var(--bpm-radius);
	padding: 16px 18px;
	box-shadow: var(--bpm-shadow);
	margin-bottom: 14px;
}

.bpm-status-tile {
	padding: 10px 18px;
}

/* -------------------------------- وضعیت پلن -------------------------------- */
.bpm-fieldset {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bpm-fieldset-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 7px 0;
	font-size: 13px;
}

.bpm-fieldset-row + .bpm-fieldset-row {
	border-top: 1px solid var(--bpm-surface-muted);
}

.bpm-fieldset-row dt {
	color: var(--bpm-ink-muted);
}

.bpm-fieldset-row dd {
	margin: 0;
	font-weight: 700;
}

.bpm-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
}

.bpm-pill--ok {
	background: var(--bpm-success-soft);
	color: var(--bpm-success);
}

.bpm-pill--warn {
	background: var(--bpm-warning-soft);
	color: var(--bpm-warning);
}

/* -------------------------------- فرم -------------------------------- */
.bpm-field {
	margin-bottom: 14px;
}

.bpm-field-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--bpm-ink-muted);
}

.bpm-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--bpm-border);
	border-radius: var(--bpm-radius-sm);
	font-family: inherit;
	font-size: 14px;
	background: var(--bpm-surface-muted);
	color: var(--bpm-ink);
	transition: border-color .15s ease, background-color .15s ease;
}

.bpm-input:focus {
	border-color: var(--bpm-accent);
	background: var(--bpm-surface);
}

.bpm-segmented {
	display: flex;
	border: 1px solid var(--bpm-border);
	border-radius: var(--bpm-radius-sm);
	overflow: hidden;
}

.bpm-segmented label {
	flex: 1;
	text-align: center;
	padding: 8px 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--bpm-ink-muted);
	cursor: pointer;
	background: var(--bpm-surface-muted);
	border-inline-start: 1px solid var(--bpm-border);
	transition: background-color .15s ease, color .15s ease;
}

.bpm-segmented label:first-child {
	border-inline-start: none;
}

.bpm-segmented input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bpm-segmented label:has(input:checked) {
	background: var(--bpm-accent-soft);
	color: var(--bpm-accent-strong);
}

.bpm-segmented label.is-disabled {
	opacity: .45;
	cursor: not-allowed;
	text-decoration: line-through;
}

.bpm-discount-row {
	display: flex;
	gap: 8px;
}

.bpm-discount-row .bpm-input {
	flex: 1;
}

.bpm-btn {
	font-family: inherit;
	border: none;
	border-radius: var(--bpm-radius-sm);
	padding: 9px 16px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .05s ease;
}

.bpm-btn:active {
	transform: scale(.98);
}

.bpm-btn-primary {
	background: var(--bpm-accent);
	color: #ffffff;
	width: 100%;
	padding: 12px 16px;
	font-size: 14.5px;
}

.bpm-btn-primary:hover {
	background: var(--bpm-accent-strong);
}

.bpm-btn-primary:disabled {
	opacity: .55;
	cursor: not-allowed;
	filter: none;
}

.bpm-btn-secondary {
	background: var(--bpm-surface-muted);
	color: var(--bpm-ink);
	border: 1px solid var(--bpm-border);
	white-space: nowrap;
}

.bpm-btn-secondary:hover {
	background: var(--bpm-accent-soft);
	color: var(--bpm-accent-strong);
}

/* -------------------------------- خلاصه قیمت -------------------------------- */
.bpm-receipt {
	background: var(--bpm-surface-muted);
	border-radius: var(--bpm-radius-sm);
	padding: 10px 14px;
	margin-bottom: 14px;
}

.bpm-receipt-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	color: var(--bpm-ink-muted);
	padding: 4px 0;
}

.bpm-receipt-row .bpm-value {
	font-weight: 700;
	color: var(--bpm-ink);
}

.bpm-receipt-row .bpm-currency {
	font-weight: 400;
	font-size: .85em;
	color: var(--bpm-ink-faint);
	margin-inline-start: 2px;
}

.bpm-receipt-row--discount .bpm-value {
	color: var(--bpm-success);
}

.bpm-receipt-row--final {
	border-top: 1px solid var(--bpm-border);
	margin-top: 4px;
	padding-top: 8px;
	font-size: 14px;
}

.bpm-receipt-row--final .bpm-value {
	color: var(--bpm-accent-strong);
	font-size: 16px;
}

/* -------------------------------- تمدید خودکار -------------------------------- */
.bpm-switch-row {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin-bottom: 14px;
}

.bpm-switch-row input {
	width: 16px;
	height: 16px;
	accent-color: var(--bpm-accent);
	flex-shrink: 0;
}

.bpm-switch-text {
	font-size: 13px;
	color: var(--bpm-ink-muted);
}

/* -------------------------------- پیام‌های سیستمی -------------------------------- */
.bpm-form-message {
	display: none;
	align-items: center;
	gap: 8px;
	border-radius: var(--bpm-radius-sm);
	padding: 10px 13px;
	font-size: 12.5px;
	line-height: 1.7;
	margin-bottom: 14px;
}

.bpm-form-message::before {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.bpm-form-message.is-error {
	display: flex;
	background: var(--bpm-danger-soft);
	color: var(--bpm-danger);
}

.bpm-form-message.is-error::before {
	content: "!";
	background: var(--bpm-danger);
	color: #fff;
}

.bpm-form-message.is-success {
	display: flex;
	background: var(--bpm-success-soft);
	color: var(--bpm-success);
}

.bpm-form-message.is-success::before {
	content: "✓";
	background: var(--bpm-success);
	color: #fff;
}

.bpm-notice {
	padding: 14px 16px;
	border-radius: var(--bpm-radius);
	font-size: 13px;
	line-height: 1.8;
}

.bpm-notice-warn {
	background: var(--bpm-warning-soft);
	color: var(--bpm-warning);
}

/* -------------------------------- شورت‌کد [boxapi_reserved_plans] -------------------------------- */
.bpm-reserved-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 4px;
	border-bottom: 1px solid var(--bpm-border);
}

.bpm-reserved-row:last-of-type {
	border-bottom: none;
}

.bpm-reserved-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.bpm-reserved-title {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--bpm-ink);
}

.bpm-reserved-meta {
	font-size: 12px;
	color: var(--bpm-ink-muted);
}

.bpm-reserved-action {
	flex-shrink: 0;
}

.bpm-reserved-action .bpm-btn-primary {
	width: auto;
	padding: 8px 18px;
	font-size: 13px;
	color: #ffffff;
}

.bpm-receipt-note{font-size:12px;line-height:1.9;opacity:.85;margin-bottom:8px}
.bpm-field-hint{font-size:12px;line-height:1.9;opacity:.75;margin:6px 0 0}
