.ebe-portal {
	--ebe-ink: #17313b;
	--ebe-muted: #5f6f77;
	--ebe-line: #d9e2e5;
	--ebe-fill: #f6faf9;
	--ebe-brand: #00727b;
	--ebe-accent: #ffac2f;
	color: var(--ebe-ink);
	font-family: inherit;
	max-width: 980px;
	margin: 0 auto;
	padding: 24px 16px 48px;
}

.ebe-portal * {
	box-sizing: border-box;
}

.ebe-portal [hidden] {
	display: none !important;
}

.ebe-portal-header {
	margin-bottom: 22px;
}

.ebe-portal-header h2 {
	margin: 0 0 8px;
	font-size: 32px;
	line-height: 1.15;
}

.ebe-kicker {
	color: var(--ebe-brand);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.ebe-alert,
.ebe-panel,
.ebe-wizard {
	background: #fff;
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	margin-bottom: 16px;
	padding: 18px;
}

.ebe-alert p {
	margin: 0 0 6px;
}

.ebe-alert p:last-child {
	margin-bottom: 0;
}

.ebe-alert-error {
	background: #fff3f1;
	border-color: #e9b8b1;
}

.ebe-alert-success {
	background: #f0faf2;
	border-color: #aadbb5;
}

.ebe-form label {
	display: grid;
	gap: 7px;
	font-weight: 700;
	margin-bottom: 14px;
}

.ebe-form input,
.ebe-form select,
.ebe-form textarea {
	border: 1px solid var(--ebe-line);
	border-radius: 6px;
	color: var(--ebe-ink);
	font: inherit;
	min-height: 46px;
	padding: 10px 12px;
	width: 100%;
}

.ebe-form input:focus,
.ebe-form select:focus,
.ebe-form textarea:focus {
	border-color: var(--ebe-brand);
	outline: 2px solid rgba(0, 114, 123, 0.16);
}

.ebe-form input.is-invalid {
	border-color: #b3261e;
}

.ebe-form input.is-valid {
	border-color: #1f8f4d;
}

.ebe-field-note {
	color: var(--ebe-muted);
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}

.ebe-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ebe-span-2 {
	grid-column: 1 / -1;
}

.ebe-progress {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	margin-bottom: 20px;
}

.ebe-progress span {
	background: var(--ebe-fill);
	border: 1px solid var(--ebe-line);
	border-radius: 999px;
	color: var(--ebe-muted);
	font-size: 12px;
	font-weight: 700;
	min-height: 32px;
	padding: 8px 10px;
	text-align: center;
}

.ebe-progress span.is-active {
	background: var(--ebe-brand);
	border-color: var(--ebe-brand);
	color: #fff;
}

.ebe-step {
	display: none;
}

.ebe-step.is-active {
	display: block;
}

.ebe-choice-group {
	display: grid;
	gap: 10px;
	margin: 0 0 18px;
}

.ebe-choice-group label {
	align-items: center;
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	display: flex;
	font-weight: 700;
	gap: 10px;
	margin: 0;
	padding: 12px;
}

.ebe-choice-group input {
	min-height: auto;
	width: auto;
}

.ebe-payment-options {
	border: 0;
	margin: 14px 0 0;
	padding: 0;
}

.ebe-payment-options legend {
	font-weight: 800;
	margin: 0 0 6px;
	padding: 0;
}

.ebe-payment-options .ebe-choice-group {
	margin-top: 12px;
}

.ebe-doc-fields {
	display: grid;
	gap: 12px;
}

.ebe-legal-box,
.ebe-legal-card {
	background: var(--ebe-fill);
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	margin-bottom: 12px;
	padding: 14px;
}

.ebe-legal-card-header {
	align-items: center;
	display: flex;
	gap: 14px;
	justify-content: space-between;
}

.ebe-legal-card h4,
.ebe-legal-modal h4 {
	font-size: 18px;
	line-height: 1.25;
	margin: 0 0 6px;
}

.ebe-legal-status {
	color: var(--ebe-muted);
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
}

.ebe-legal-status.is-accepted {
	color: #1f8f4d;
}

.ebe-legal-status.is-rejected {
	color: #b3261e;
}

.ebe-legal-box label {
	align-items: center;
	display: flex;
	gap: 10px;
	margin: 12px 0 0;
}

.ebe-legal-box input {
	min-height: auto;
	width: auto;
}

.ebe-legal-accept {
	align-items: center;
	display: flex !important;
	gap: 10px;
	margin: 14px 0 0 !important;
}

.ebe-legal-accept input {
	min-height: auto;
	width: auto;
}

.ebe-legal-error {
	background: #fff3f1;
	border: 1px solid #e9b8b1;
	border-radius: 8px;
	color: #8d1f14;
	font-weight: 700;
	margin: 0 0 12px;
	padding: 11px 12px;
}

.ebe-legal-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 18px;
	position: fixed;
	z-index: 999999;
}

.ebe-legal-modal-backdrop {
	background: rgba(10, 28, 34, 0.58);
	inset: 0;
	position: absolute;
}

.ebe-legal-modal-dialog {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(10, 28, 34, 0.28);
	display: grid;
	gap: 14px;
	max-height: min(760px, calc(100vh - 36px));
	max-width: 760px;
	padding: 18px;
	position: relative;
	width: min(760px, 100%);
}

.ebe-legal-modal-header {
	align-items: start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.ebe-legal-modal-body {
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	line-height: 1.65;
	max-height: min(460px, 52vh);
	overflow: auto;
	padding: 16px;
}

.ebe-legal-modal-body > :first-child {
	margin-top: 0;
}

.ebe-legal-modal-body > :last-child {
	margin-bottom: 0;
}

.ebe-legal-modal-actions {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.ebe-modal-open {
	overflow: hidden;
}

.ebe-signature-pad {
	aspect-ratio: 720 / 220;
	background: #fff;
	border: 1px dashed var(--ebe-line);
	border-radius: 8px;
	display: block;
	max-width: 100%;
	touch-action: none;
	width: 100%;
}

.ebe-button,
.ebe-button-secondary,
.ebe-link-button {
	align-items: center;
	border-radius: 6px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	justify-content: center;
	min-height: 46px;
	padding: 11px 18px;
	text-decoration: none;
}

.ebe-portal .ebe-button,
.ebe-portal a.ebe-button,
.ebe-portal a.ebe-button:visited,
.ebe-portal button.ebe-button {
	background: var(--ebe-brand);
	border: 1px solid var(--ebe-brand);
	color: #fff !important;
}

.ebe-portal .ebe-button:hover,
.ebe-portal .ebe-button:focus,
.ebe-portal a.ebe-button:hover,
.ebe-portal a.ebe-button:focus,
.ebe-portal button.ebe-button:hover,
.ebe-portal button.ebe-button:focus {
	background: #005b62;
	border-color: #005b62;
	color: #fff !important;
}

.ebe-button-secondary,
.ebe-link-button {
	background: #fff;
	border: 1px solid var(--ebe-line);
	color: var(--ebe-ink);
}

.ebe-button-secondary:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ebe-link-button {
	min-height: 36px;
	padding: 7px 10px;
}

.ebe-wizard-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 18px;
}

.ebe-wizard-actions [data-ebe-prev] {
	margin-right: auto;
}

.ebe-status-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 12px 0;
}

.ebe-status-grid div {
	background: var(--ebe-fill);
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	padding: 12px;
}

.ebe-status-grid span {
	color: var(--ebe-muted);
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 5px;
}

.ebe-doc-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ebe-doc-list li {
	align-items: center;
	border: 1px solid var(--ebe-line);
	border-radius: 8px;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding: 11px 12px;
}

.ebe-doc-list strong {
	color: var(--ebe-brand);
}

.ebe-payment-panel {
	border-color: var(--ebe-accent);
}

@media (max-width: 760px) {
	.ebe-portal {
		padding: 18px 12px 36px;
	}

	.ebe-portal-header h2 {
		font-size: 26px;
	}

	.ebe-grid,
	.ebe-status-grid {
		grid-template-columns: 1fr;
	}

	.ebe-progress {
		display: flex;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.ebe-progress span {
		flex: 0 0 auto;
	}

	.ebe-wizard-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.ebe-wizard-actions [data-ebe-prev] {
		margin-right: 0;
	}

	.ebe-button,
	.ebe-button-secondary {
		width: 100%;
	}

	.ebe-legal-card-header,
	.ebe-legal-modal-actions {
		align-items: stretch;
		display: grid;
		grid-template-columns: 1fr;
	}

	.ebe-legal-modal {
		padding: 10px;
	}

	.ebe-legal-modal-dialog {
		max-height: calc(100vh - 20px);
	}
}
