.kcp-portal,
.kcp-portal * {
	box-sizing: border-box;
}

.kcp-portal {
	--kcp-primary: #00dc43;
	--kcp-dark: #101820;
	--kcp-accent: #087c2d;
	position: relative;
	width: min(100%, 940px);
	margin: 32px auto;
	overflow: hidden;
	color: #172027;
	background: #fff;
	border: 1px solid #e4e8ea;
	border-radius: 18px;
	box-shadow: 0 22px 65px rgba(16, 24, 32, 0.12);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.kcp-portal__accent {
	height: 6px;
	background: linear-gradient(90deg, var(--kcp-primary), var(--kcp-accent));
}

.kcp-portal__header {
	padding: 42px 44px 32px;
	color: #fff;
	background:
		radial-gradient(circle at 92% 0, rgba(0, 220, 67, 0.17), transparent 34%),
		linear-gradient(130deg, var(--kcp-dark), #1c2a34);
}

.kcp-portal__eyebrow {
	display: block;
	margin-bottom: 8px;
	color: var(--kcp-primary);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.kcp-portal__header h2 {
	margin: 0 0 10px;
	color: #fff;
	font-size: clamp(1.85rem, 4vw, 2.65rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.035em;
}

.kcp-portal__header p {
	max-width: 650px;
	margin: 0;
	color: #d7dfe3;
	font-size: 1rem;
	line-height: 1.65;
}

.kcp-mode-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0;
	padding: 0 44px;
	background: #f6f8f9;
	border-bottom: 1px solid #e5e9eb;
}

.kcp-mode-tab {
	position: relative;
	padding: 20px 14px;
	color: #66727a;
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 750;
}

.kcp-mode-tab::after {
	position: absolute;
	right: 18%;
	bottom: -1px;
	left: 18%;
	height: 3px;
	content: "";
	background: transparent;
	border-radius: 3px 3px 0 0;
}

.kcp-mode-tab:hover,
.kcp-mode-tab:focus-visible,
.kcp-mode-tab.is-active {
	color: var(--kcp-dark);
}

.kcp-mode-tab.is-active::after {
	background: var(--kcp-primary);
}

.kcp-mode-tab:focus-visible,
.kcp-account-card:focus-visible,
.kcp-button:focus-visible,
.kcp-password-toggle:focus-visible,
.kcp-portal a:focus-visible {
	outline: 3px solid rgba(0, 220, 67, 0.42);
	outline-offset: 3px;
}

.kcp-panel {
	padding: 38px 44px 44px;
}

.kcp-feedback {
	margin: 28px 44px 0;
	padding: 14px 16px;
	border-radius: 8px;
	font-weight: 650;
	line-height: 1.5;
}

.kcp-feedback--success {
	color: #075d25;
	background: #e7f8ed;
	border: 1px solid #9ce0b2;
}

.kcp-feedback--error {
	color: #8c1c23;
	background: #fff0f1;
	border: 1px solid #f2b8bc;
}

.kcp-account-choice {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 28px;
}

.kcp-account-card {
	display: flex;
	gap: 14px;
	align-items: center;
	min-height: 94px;
	padding: 17px 18px;
	color: #26323a;
	text-align: left;
	background: #fff;
	border: 2px solid #dfe5e8;
	border-radius: 12px;
	cursor: pointer;
	font: inherit;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.kcp-account-card:hover {
	border-color: #aab5bb;
	transform: translateY(-1px);
}

.kcp-account-card.is-selected {
	background: linear-gradient(145deg, #fff, #f3fff7);
	border-color: var(--kcp-primary);
	box-shadow: 0 8px 24px rgba(0, 220, 67, 0.11);
}

.kcp-account-card__icon {
	display: grid;
	flex: 0 0 42px;
	height: 42px;
	color: var(--kcp-dark);
	background: #e8edef;
	border-radius: 50%;
	place-items: center;
	font-weight: 850;
}

.kcp-account-card.is-selected .kcp-account-card__icon {
	background: var(--kcp-primary);
}

.kcp-account-card strong,
.kcp-account-card small {
	display: block;
}

.kcp-account-card strong {
	margin-bottom: 4px;
	font-size: 0.98rem;
}

.kcp-account-card small {
	color: #69757d;
	font-size: 0.82rem;
	line-height: 1.35;
}

.kcp-form {
	display: grid;
	gap: 20px;
}

.kcp-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.kcp-trade-fields {
	display: grid;
	gap: 20px;
	padding: 24px;
	background: #f7f9fa;
	border: 1px solid #e4e9eb;
	border-radius: 12px;
}

.kcp-field label {
	display: block;
	margin: 0 0 7px;
	color: #2c373e;
	font-size: 0.88rem;
	font-weight: 720;
}

.kcp-field input,
.kcp-field textarea {
	width: 100%;
	margin: 0;
	padding: 13px 14px;
	color: #11191e;
	background: #fff;
	border: 1px solid #cbd3d7;
	border-radius: 8px;
	box-shadow: none;
	font: inherit;
	line-height: 1.35;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.kcp-field textarea {
	resize: vertical;
}

.kcp-field input:hover,
.kcp-field textarea:hover {
	border-color: #97a4ab;
}

.kcp-field input:focus,
.kcp-field textarea:focus {
	border-color: var(--kcp-accent);
	box-shadow: 0 0 0 3px rgba(0, 220, 67, 0.15);
	outline: 0;
}

.kcp-password-wrap {
	position: relative;
}

.kcp-password-wrap input {
	padding-right: 70px;
}

.kcp-password-toggle {
	position: absolute;
	top: 50%;
	right: 7px;
	padding: 7px 8px;
	color: #4d5a62;
	background: transparent;
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 750;
	transform: translateY(-50%);
}

.kcp-password-toggle:hover {
	color: var(--kcp-accent);
	background: #f1f5f3;
}

.kcp-help {
	display: block;
	margin-top: 5px;
	color: #718087;
	font-size: 0.78rem;
}

.kcp-form-row {
	display: flex;
	gap: 16px;
	align-items: center;
}

.kcp-form-row--between {
	justify-content: space-between;
}

.kcp-checkbox {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	font-size: 0.88rem;
}

.kcp-checkbox input {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--kcp-accent);
}

.kcp-text-link {
	color: var(--kcp-accent);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
}

.kcp-text-link:hover {
	color: #04591e;
	text-decoration: underline;
}

.kcp-trade-note {
	margin: 0;
	padding: 13px 15px;
	color: #5e4b12;
	background: #fff8df;
	border-left: 4px solid #efc849;
	border-radius: 6px;
	font-size: 0.87rem;
	line-height: 1.5;
}

.kcp-button {
	display: inline-flex;
	gap: 9px;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	text-decoration: none;
	transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.kcp-button:hover {
	transform: translateY(-1px);
}

.kcp-button--primary {
	color: #08140c;
	background: var(--kcp-primary);
	box-shadow: 0 9px 24px rgba(0, 180, 55, 0.2);
}

.kcp-button--primary:hover {
	color: #08140c;
	filter: brightness(0.94);
}

.kcp-button--ghost {
	color: var(--kcp-dark);
	background: #fff;
	border: 1px solid #ccd5d9;
}

.kcp-button--full {
	width: 100%;
}

.kcp-button:disabled {
	cursor: wait;
	opacity: 0.72;
	transform: none;
}

.kcp-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(16, 24, 32, 0.28);
	border-top-color: var(--kcp-dark);
	border-radius: 50%;
	animation: kcp-spin 0.7s linear infinite;
}

.kcp-button.is-loading .kcp-spinner {
	display: inline-block;
}

.kcp-signed-in {
	padding: 52px 44px;
	text-align: center;
}

.kcp-signed-in__icon {
	display: grid;
	width: 62px;
	height: 62px;
	margin: 0 auto 18px;
	color: var(--kcp-dark);
	background: var(--kcp-primary);
	border-radius: 50%;
	font-size: 1.65rem;
	font-weight: 900;
	place-items: center;
}

.kcp-signed-in h3 {
	margin: 0 0 10px;
	color: var(--kcp-dark);
	font-size: 1.55rem;
}

.kcp-signed-in p {
	max-width: 620px;
	margin: 0 auto 26px;
	color: #647077;
	line-height: 1.6;
}

.kcp-signed-in__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: center;
}

.kcp-account-notice {
	position: relative;
	z-index: 50;
	width: min(100% - 24px, 1180px);
	margin: 12px auto;
	padding: 13px 18px;
	border-radius: 7px;
	font: 650 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kcp-account-notice--pending {
	color: #604b0d;
	background: #fff7d9;
	border: 1px solid #e9cc63;
}

.kcp-account-notice--rejected {
	color: #8c1c23;
	background: #fff0f1;
	border: 1px solid #f0b8bd;
}

[hidden] {
	display: none !important;
}

@keyframes kcp-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
	.kcp-portal {
		margin: 18px auto;
		border-radius: 12px;
	}

	.kcp-portal__header,
	.kcp-panel,
	.kcp-signed-in {
		padding-right: 22px;
		padding-left: 22px;
	}

	.kcp-portal__header {
		padding-top: 32px;
		padding-bottom: 26px;
	}

	.kcp-mode-tabs {
		padding: 0 12px;
	}

	.kcp-feedback {
		margin-right: 22px;
		margin-left: 22px;
	}

	.kcp-account-choice,
	.kcp-form-grid {
		grid-template-columns: 1fr;
	}

	.kcp-trade-fields {
		padding: 18px;
	}

	.kcp-form-row--between {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kcp-account-card,
	.kcp-button,
	.kcp-spinner {
		transition: none;
		animation-duration: 0.01ms;
	}
}

