/*
 * Auth screens (login + signup).
 * Standalone shell - these pages sit outside the dashboard chrome, so they only
 * borrow the brand variables from custom.min.css and style everything else here.
 * Single centred card, no split panel.
 */

.auth {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 1.5rem;
	overflow: hidden;
	background: #F1F4F8;
}

/* Soft brand wash behind the card - blue above, the logo's orange below */
.auth::before,
.auth::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.auth::before {
	width: 46rem;
	height: 46rem;
	top: -24rem;
	left: 50%;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(16, 96, 152, 0.14) 0%, transparent 68%);
}

.auth::after {
	width: 34rem;
	height: 34rem;
	bottom: -20rem;
	right: -10rem;
	background: radial-gradient(circle, rgba(232, 144, 40, 0.16) 0%, transparent 70%);
}

.auth__card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 27.5rem;
	padding: 2.75rem 2.5rem;
	background: var(--white);
	border: 1px solid #E9EDF2;
	border-radius: 1.1rem;
	box-shadow: 0 20px 50px rgba(24, 48, 96, 0.09);
}

.auth__card--wide {
	max-width: 34rem;
}

/* Head ------------------------------------------------------------------ */

.auth__logo {
	display: block;
	width: fit-content;
	margin: 0 auto 1.75rem;
}

.auth__logo img {
	height: 2.25rem;
	width: auto;
	display: block;
}

.auth__title {
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-align: center;
	color: var(--theme-color);
	margin-bottom: 0.4rem;
}

.auth__subtitle {
	font-size: 0.92rem;
	text-align: center;
	color: var(--grey);
	margin-bottom: 2rem;
}

/* Fields ---------------------------------------------------------------- */

.auth__label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--theme-color);
	margin-bottom: 0.45rem;
}

.auth__field {
	position: relative;
	margin-bottom: 1.15rem;
}

.auth__field i.auth__field-icon {
	position: absolute;
	left: 0.95rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.85rem;
	color: var(--grey);
	pointer-events: none;
	transition: color 200ms linear;
}

.auth__field input,
.auth__field select {
	width: 100%;
	height: 3.05rem;
	padding: 0 1rem 0 2.6rem;
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--secondary);
	background: #FAFBFC;
	border: 1px solid #E5E7EB;
	border-radius: 0.6rem;
	outline: none;
	transition: border-color 200ms linear, box-shadow 200ms linear, background 200ms linear;
}

.auth__field select {
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23656565' stroke-width='1.5' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 0.8rem;
	padding-right: 2.5rem;
}

.auth__field input::placeholder {
	color: #9CA3AF;
	font-weight: 400;
}

.auth__field input:focus,
.auth__field select:focus {
	background: var(--white);
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(16, 96, 152, 0.14);
}

.auth__field input:focus ~ i.auth__field-icon {
	color: var(--primary);
}

/* Show/hide password button, injected by the page script */
.auth__toggle {
	position: absolute;
	right: 0.55rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2.1rem;
	height: 2.1rem;
	display: grid;
	place-items: center;
	padding: 0;
	font-size: 0.85rem;
	color: var(--grey);
	background: transparent;
	border: 0;
	border-radius: 0.4rem;
	cursor: pointer;
	transition: color 200ms linear, background 200ms linear;
}

.auth__toggle:hover {
	color: var(--primary);
	background: var(--primary-tint-soft);
}

.auth__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1rem;
}

.auth__row > * {
	flex: 1 1 11rem;
}

.auth__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.35rem 0 1.6rem;
}

.auth__check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.87rem;
	font-weight: 500;
	color: var(--grey);
	cursor: pointer;
	margin: 0;
}

.auth__check input {
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--primary);
	cursor: pointer;
	flex-shrink: 0;
}

.auth__link {
	font-size: 0.87rem;
	font-weight: 600;
	color: var(--primary);
}

.auth__link:hover {
	color: var(--primary-dark);
	text-decoration: underline !important;
}

.auth__submit {
	width: 100%;
	height: 3.15rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	font-size: 0.97rem;
	font-weight: 600;
	color: var(--white);
	background: var(--primary);
	border: 0;
	border-radius: 0.6rem;
	cursor: pointer;
	transition: background 200ms linear, box-shadow 200ms linear, transform 150ms ease;
}

.auth__submit:hover {
	background: var(--primary-dark);
	box-shadow: 0 8px 20px rgba(16, 96, 152, 0.28);
	transform: translateY(-1px);
}

/* Foot ------------------------------------------------------------------ */

.auth__divider {
	position: relative;
	text-align: center;
	margin: 1.6rem 0;
}

.auth__divider::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: #E5E7EB;
}

.auth__divider span {
	position: relative;
	padding: 0 0.9rem;
	font-size: 0.82rem;
	color: var(--grey);
	background: var(--white);
}

.auth__alt {
	text-align: center;
	font-size: 0.9rem;
	color: var(--grey);
	margin: 0;
}

.auth__alt a {
	font-weight: 600;
	color: var(--primary);
}

.auth__alt a:hover {
	color: var(--primary-dark);
	text-decoration: underline !important;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 575px) {
	.auth {
		padding: 1.5rem 1rem;
	}

	.auth__card {
		padding: 2rem 1.4rem;
		border-radius: 0.9rem;
	}

	.auth__title {
		font-size: 1.35rem;
	}

	.auth__row > * {
		flex: 1 1 100%;
	}
}
