* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
	margin: 0;
}

body {
	background: var(--bitshop-surface-soft);
	color: var(--bitshop-graphite);
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.bitshop-auth-shell {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 24px 16px;
}

.bitshop-auth-panel {
	position: relative;
	z-index: 2;
	width: min(100%, 480px);
	padding: 0;
	border: 1px solid var(--bitshop-border);
	border-radius: 12px;
	background: var(--bitshop-white);
	box-shadow: none;
}

.bitshop-auth-logo {
	display: inline-flex;
	align-items: center;
	margin-bottom: 0;
	text-decoration: none;
}

.bitshop-auth-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	min-height: 88px;
	padding: 12px 24px;
}

.bitshop-auth-back,
.bitshop-auth-forgot {
	color: var(--bitshop-cyan-dark);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.bitshop-auth-back:hover,
.bitshop-auth-forgot:hover {
	text-decoration: none;
}

.bitshop-auth-forgot {
	justify-self: end;
}

.bitshop-auth-logo img {
	display: block;
	width: 190px;
	max-width: 100%;
	height: auto;
}

.bitshop-auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 22px;
	padding: 4px;
	border: 1px solid var(--bitshop-border);
	border-radius: 8px;
	background: var(--bitshop-surface-soft);
}

.bitshop-auth-tabs a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border-radius: 6px;
	color: var(--bitshop-graphite-muted);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.bitshop-auth-tabs a.is-active {
	background: var(--bitshop-white);
	color: var(--bitshop-cyan-dark);
	box-shadow: none;
}

.bitshop-auth-alert {
	margin: 0 0 18px;
	padding: 13px 14px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.bitshop-auth-alert-error {
	border: 1px solid var(--bitshop-error);
	background: var(--bitshop-error-background);
	color: var(--bitshop-error);
}

.bitshop-auth-alert-success {
	border: 1px solid var(--bitshop-mint);
	background: var(--bitshop-mint-soft);
	color: var(--bitshop-mint-dark);
}

.bitshop-auth-dev-code {
	margin-top: 6px;
	color: var(--bitshop-graphite);
}

.bitshop-auth-form {
	display: grid;
	gap: 13px;
}

.bitshop-auth-field {
	display: grid;
	gap: 8px;
	margin: 0;
	color: var(--bitshop-graphite-muted);
	font-size: 13px;
	font-weight: 800;
}

.bitshop-auth-field input {
	width: 100%;
	height: 48px;
	padding: 0 15px;
	border: 1px solid var(--bitshop-border);
	border-radius: 7px;
	background: var(--bitshop-white);
	color: var(--bitshop-graphite);
	font-size: 16px;
	font-weight: 400;
	outline: none;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.bitshop-auth-field input:-webkit-autofill,
.bitshop-auth-field input:-webkit-autofill:hover,
.bitshop-auth-field input:-webkit-autofill:focus {
	font-size: 16px !important;
	font-weight: 400;
	-webkit-text-fill-color: var(--bitshop-graphite);
}

.bitshop-auth-field input:not([data-bitshop-phone-input]):focus {
	border-color: var(--bitshop-cyan-dark);
	box-shadow: none;
}

.bitshop-password-input {
	position: relative;
	display: block;
}

.bitshop-password-input input {
	padding-right: 50px;
}

.bitshop-password-input button {
	position: absolute;
	top: 50%;
	right: 8px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: var(--bitshop-transparent);
	color: var(--bitshop-graphite-muted);
	cursor: pointer;
	transform: translateY(-50%);
}

.bitshop-password-input button svg {
	display: block;
	width: 24px;
	height: 24px;
	margin: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bitshop-password-input .bitshop-eye-slash {
	display: block;
}

.bitshop-password-input button[aria-pressed="true"] {
	color: var(--bitshop-cyan-dark);
}

.bitshop-password-input button[aria-pressed="true"] .bitshop-eye-slash {
	display: none;
}

.bitshop-auth-channel {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.bitshop-auth-channel label {
	position: relative;
	margin: 0;
}

.bitshop-auth-channel input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bitshop-auth-channel span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border: 1px solid var(--bitshop-border);
	border-radius: 7px;
	background: var(--bitshop-surface-soft);
	color: var(--bitshop-graphite-muted);
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.bitshop-auth-channel input:checked + span {
	border-color: var(--bitshop-cyan-dark);
	background: var(--bitshop-cyan-soft);
	color: var(--bitshop-cyan-dark);
}

.bitshop-code-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 150px;
	align-items: end;
	gap: 10px;
}

.bitshop-code-button,
.bitshop-auth-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.bitshop-code-button {
	background: var(--bitshop-cyan-soft);
	color: var(--bitshop-cyan-dark);
}

.bitshop-code-button:hover {
	background: var(--bitshop-cyan-soft);
}

.bitshop-auth-verification-actions {
	display: grid;
	gap: 10px;
}

.bitshop-auth-link-button {
	padding: 4px;
	border: 0;
	background: var(--bitshop-transparent);
	color: var(--bitshop-cyan-dark);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.bitshop-auth-link-button:hover {
	text-decoration: none;
}

.bitshop-auth-submit {
	margin-top: 2px;
	background: var(--bitshop-cyan-dark);
	color: var(--bitshop-white);
}

.bitshop-auth-submit:hover {
	background: var(--bitshop-cyan-dark);
}

.bitshop-auth-options {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
}

.bitshop-auth-options .bitshop-auth-forgot {
	text-align: right;
	white-space: nowrap;
}

.bitshop-auth-remember {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--bitshop-graphite);
	font-size: 14px;
	font-weight: 600;
}

.bitshop-auth-remember input {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
}

.bitshop-auth-help {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 18px;
	justify-content: center;
	margin-top: 20px;
}

.bitshop-auth-help a {
	color: var(--bitshop-cyan-dark);
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
}

.bitshop-auth-help a:hover {
	color: var(--bitshop-cyan-dark);
}

.bitshop-auth-ready {
	display: grid;
	gap: 14px;
}

.bitshop-auth-ready h1 {
	margin: 0;
	color: var(--bitshop-graphite);
	font-size: 28px;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: 0;
}

.bitshop-auth-ready p {
	margin: 0 0 8px;
	color: var(--bitshop-graphite);
	font-size: 16px;
	line-height: 1.45;
}

.bitshop-auth-ready .bitshop-code-button {
	text-decoration: none;
}

.bitshop-auth-login-switch {
	display: block;
	margin: 0 0 18px;
	color: var(--bitshop-cyan-dark);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.bitshop-auth-field[hidden],
.bitshop-auth-login-switch[hidden],
.bitshop-auth-forgot[hidden],
.bitshop-auth-alert[hidden] {
	display: none;
}

.bitshop-auth-back,
button.bitshop-auth-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 16px;
	border: 1px solid var(--bitshop-cyan-dark);
	border-radius: 8px;
	background: #fff;
	color: #000;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.bitshop-auth-back:hover {
	background: #fff;
	color: #000;
	text-decoration: none;
}

.bitshop-auth-close {
	grid-column: 2;
	grid-row: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 7px;
	color: #000;
	text-decoration: none;
}

.bitshop-auth-close svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.bitshop-auth-back:focus-visible,
.bitshop-auth-close:focus-visible {
	outline: 2px solid var(--bitshop-cyan-dark);
	outline-offset: 3px;
}

.bitshop-auth-body {
	padding: 12px 32px 32px;
}

.bitshop-auth-heading {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.bitshop-auth-title {
	margin: 0;
	color: var(--bitshop-graphite);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
}

.bitshop-auth-logo {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

.bitshop-auth-back,
button.bitshop-auth-back {
	grid-column: 2;
	grid-row: 1;
}

.bitshop-auth-back-icon {
	display: none;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bitshop-auth-verification-links {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.bitshop-auth-verification-links .bitshop-auth-link-button {
	padding: 4px 0;
	font-size: 13px;
	white-space: nowrap;
}

.bitshop-auth-panel a,
.bitshop-auth-panel a:hover,
.bitshop-auth-panel .bitshop-auth-link-button:hover {
	text-decoration: none;
	cursor: pointer;
}

.bitshop-auth-tabs[hidden],
.bitshop-auth-title[hidden],
.bitshop-auth-heading[hidden] {
	display: none;
}

@media (max-width: 560px) {
	.bitshop-auth-shell {
		padding: 20px 16px;
	}

	.bitshop-auth-panel {
		width: 100%;
		min-height: 0;
	}

	.bitshop-auth-top {
		grid-template-columns: minmax(0, 1fr) 40px;
		min-height: 76px;
		gap: 8px;
		padding: 8px 12px;
	}

	.bitshop-auth-logo {
		grid-column: 1;
		justify-self: start;
	}

	.bitshop-auth-logo img {
		width: 164px;
	}

	.bitshop-auth-body {
		padding: 8px 20px 24px;
	}

	.bitshop-auth-back,
	button.bitshop-auth-back {
		grid-column: 1;
		width: 40px;
		min-height: 40px;
		padding: 8px;
		border: 0;
		background: transparent;
		color: var(--bitshop-cyan-dark);
	}

	.bitshop-auth-back:hover {
		color: var(--bitshop-cyan-dark);
	}

	.bitshop-auth-back-label {
		display: none;
	}

	.bitshop-auth-back-icon {
		display: block;
	}

	.bitshop-auth-heading:has(.bitshop-auth-back) {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 8px;
	}

	.bitshop-auth-heading:has(.bitshop-auth-back) .bitshop-auth-title {
		grid-column: 2;
		grid-row: 1;
	}

	.bitshop-auth-title {
		font-size: 22px;
	}
}

@media (max-width: 360px) {
	.bitshop-auth-body { padding: 8px 16px 20px; }
	.bitshop-auth-verification-links .bitshop-auth-link-button { font-size: 12px; }
	.bitshop-auth-options { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.bitshop-auth-options .bitshop-auth-forgot { justify-self: start; }
}
