:root {
	--brand-900: #003087;
	--brand-700: #0052cc;
	--brand-50: #eef4ff;
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f1f5f9;
	--card: #ffffff;
	--ok: #16a34a;
	--ok-bg: #dcfce7;
	--bad: #dc2626;
	--bad-bg: #fee2e2;
	--radius: 20px;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.hero {
	background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
	padding: 28px 16px 96px;
	color: #fff;
}

.hero-inner {
	max-width: 480px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.hero img {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #fff;
	padding: 4px;
	object-fit: contain;
}

.hero h1 { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.3; }
.hero p { font-size: 12px; margin: 2px 0 0; color: #bfdbfe; }

.wrap {
	max-width: 480px;
	margin: -72px auto 32px;
	padding: 0 16px;
}

.card {
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

.card-body { padding: 24px; }

.steps {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 16px 24px;
	border-bottom: 1px solid var(--line);
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.step { display: flex; align-items: center; gap: 6px; }
.step .dot {
	width: 20px; height: 20px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--line); color: var(--muted); font-size: 11px;
}
.step.active { color: var(--brand-700); }
.step.active .dot { background: var(--brand-700); color: #fff; }
.step.done { color: var(--ok); }
.step.done .dot { background: var(--ok); color: #fff; }

.amount-box {
	text-align: center;
	padding: 8px 0 20px;
}
.amount-box .label {
	font-size: 12px; font-weight: 600; color: var(--muted);
	text-transform: uppercase; letter-spacing: .06em;
}
.amount-box .value {
	font-size: 36px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em;
}
.amount-box .value small { font-size: 16px; font-weight: 600; color: var(--muted); margin-right: 6px; }

.details {
	background: #f8fafc;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 4px 16px;
	margin: 0;
}
.details .row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--line);
	font-size: 14px;
}
.details .row:last-child { border-bottom: 0; }
.details dt { color: var(--muted); margin: 0; flex-shrink: 0; }
.details dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: 0;
	border-radius: 14px;
	padding: 15px 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: transform .08s ease, background .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand-700); color: #fff; box-shadow: 0 6px 16px rgba(0, 82, 204, .3); }
.btn-primary:hover { background: var(--brand-900); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-outline { background: #fff; color: var(--brand-700); border: 2px solid var(--brand-50); }
.btn-outline:hover { background: var(--brand-50); }
.actions { display: grid; gap: 10px; margin-top: 24px; }

.alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 14px;
	margin-bottom: 16px;
	background: var(--bad-bg);
	color: #991b1b;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }

.status { text-align: center; padding: 8px 0 16px; }
.status .icon {
	width: 72px; height: 72px; border-radius: 50%;
	margin: 0 auto 14px;
	display: flex; align-items: center; justify-content: center;
}
.status.ok .icon { background: var(--ok-bg); color: var(--ok); }
.status.bad .icon { background: var(--bad-bg); color: var(--bad); }
.status h2 { margin: 0; font-size: 22px; font-weight: 800; }
.status p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	background: #f8fafc;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
}
.trust .sep { width: 1px; height: 14px; background: var(--line); }

.spinner {
	width: 18px; height: 18px;
	border: 2px solid rgba(255, 255, 255, .5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	margin-top: 20px;
}

/* Form fields (test page) */
.field { margin-bottom: 14px; }
.field label {
	display: block; font-size: 12px; font-weight: 600; color: var(--muted);
	text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.field input {
	width: 100%;
	padding: 12px 14px;
	border: 2px solid var(--line);
	border-radius: 12px;
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	outline: none;
	transition: border-color .15s ease;
}
.field input:focus { border-color: var(--brand-700); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.print-only { display: none; }

/* Layout: single column on phones (actions last), two columns on desktop */
.split { display: flex; flex-direction: column; }
.col-main, .col-side { display: contents; }
.split .actions { order: 10; }
.split .print-only { order: 11; }

@media (min-width: 820px) {
	.hero { padding: 36px 24px 110px; }
	.hero-inner { max-width: 880px; }
	.hero img { width: 52px; height: 52px; }
	.hero h1 { font-size: 18px; }
	.hero p { font-size: 13px; }

	.wrap { max-width: 880px; margin-top: -80px; padding: 0 24px; }
	.card-body { padding: 36px 40px; }
	.steps { justify-content: center; gap: 48px; padding: 18px 40px; }

	.split {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: 40px;
		align-items: center;
	}
	.col-main, .col-side { display: block; }
	.col-main { padding-right: 40px; border-right: 1px solid var(--line); }
	.col-main .status { padding-top: 0; }
	.amount-box .value { font-size: 40px; }
	.details .row { font-size: 15px; }
}

@media (max-width: 400px) {
	.card-body { padding: 20px; }
	.amount-box .value { font-size: 30px; }
	.steps { padding: 14px 16px; font-size: 10px; letter-spacing: .02em; }
	.step { gap: 5px; }
	.step .dot { width: 18px; height: 18px; font-size: 10px; }
	.grid-2 { grid-template-columns: 1fr; }
}

@media print {
	body { background: #fff; }
	.hero { background: none; color: var(--ink); padding: 0 0 16px; }
	.hero p { color: var(--muted); }
	.wrap { margin: 0 auto; }
	.card { box-shadow: none; border: 1px solid var(--line); }
	.no-print { display: none !important; }
	.print-only { display: block; }
}
