.iop-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 12, 20, 0.75);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 16px;
	box-sizing: border-box;
}
.iop-overlay.iop-open { display: flex; }

.iop-modal {
	position: relative;
	background: #12141c;
	color: #f2f2f5;
	width: 100%;
	max-width: 480px;
	border-radius: 16px;
	padding: 28px 24px 24px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	max-height: 92vh;
	overflow-y: auto;
	animation: iop-pop .25s ease;
}
@keyframes iop-pop {
	from { transform: scale(.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.iop-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: transparent;
	border: none;
	color: #9a9ba8;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.iop-close:hover { color: #fff; }

.iop-progress {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-bottom: 18px;
}
.iop-dot {
	width: 26px;
	height: 4px;
	border-radius: 2px;
	background: #33353f;
}
.iop-dot.active { background: #ff4d5e; }

.iop-modal h2 {
	margin: 0 0 4px;
	font-size: 21px;
	text-align: center;
}
.iop-sub {
	text-align: center;
	color: #a4a5b3;
	font-size: 13px;
	margin: 0 0 18px;
}

/* plans */
.iop-plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.iop-plan-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1px solid #2a2c37;
	border-radius: 10px;
	padding: 12px 14px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.iop-plan-card:hover { border-color: #4a4d5c; }
.iop-plan-card input { display: none; }
.iop-plan-card input:checked ~ .iop-plan-name,
.iop-plan-card input:checked ~ .iop-plan-price { color: #ff4d5e; }
.iop-plan-card:has(input:checked) { border-color: #ff4d5e; background: rgba(255,77,94,0.08); }
.iop-plan-name { font-weight: 600; font-size: 14.5px; }
.iop-plan-price { font-weight: 700; font-size: 14.5px; }

/* devices */
.iop-devices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 18px;
}
.iop-device-card {
	border: 1px solid #2a2c37;
	border-radius: 10px;
	padding: 14px 10px;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.iop-device-card:hover { border-color: #4a4d5c; }
.iop-device-card input { display: none; }
.iop-device-card:has(input:checked) { border-color: #ff4d5e; background: rgba(255,77,94,0.08); }
.iop-device-icon { display: block; font-size: 24px; margin-bottom: 6px; }
.iop-device-name { display: block; font-weight: 600; font-size: 13.5px; }
.iop-device-sub { display: block; font-size: 11px; color: #9294a3; margin-top: 3px; }

/* connections */
.iop-connections { display: flex; gap: 10px; margin-bottom: 18px; justify-content: center; }
.iop-conn-card {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid #2a2c37;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	cursor: pointer;
}
.iop-conn-card input { display: none; }
.iop-conn-card:has(input:checked) { border-color: #ff4d5e; background: rgba(255,77,94,0.12); color: #ff4d5e; }

/* order summary */
.iop-order-summary {
	background: #1a1c26;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 12.5px;
	color: #c6c7d2;
	margin-bottom: 16px;
	line-height: 1.6;
}
.iop-order-summary strong { color: #fff; }

/* fields */
.iop-field { margin-bottom: 12px; }
.iop-field label { display: block; font-size: 12.5px; margin-bottom: 5px; color: #c6c7d2; }
.iop-field input {
	width: 100%;
	box-sizing: border-box;
	background: #1a1c26;
	border: 1px solid #2a2c37;
	border-radius: 8px;
	padding: 11px 12px;
	color: #fff;
	font-size: 14px;
}
.iop-field input:focus { outline: none; border-color: #ff4d5e; }

.iop-error { color: #ff6b6b; font-size: 12.5px; margin: 4px 0 8px; }

/* buttons */
.iop-btn {
	border: none;
	border-radius: 10px;
	padding: 13px 18px;
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
	width: 100%;
}
.iop-btn.iop-next, .iop-btn.iop-submit {
	background: linear-gradient(135deg, #ff4d5e, #ff7a3d);
	color: #fff;
}
.iop-btn.iop-next:disabled { opacity: .4; cursor: not-allowed; }
.iop-btn.iop-back {
	background: transparent;
	color: #c6c7d2;
	border: 1px solid #2a2c37;
}
.iop-nav { display: flex; gap: 10px; }
.iop-nav .iop-btn { width: auto; flex: 1; }

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