/*==========================================================================
  UNQUEST CAPITALS - AUTHENTICATION
  Split shell: brand panel on the left, form on the right.
  Collapses to a single centred column below 992px.

  Depends on theme.css + ui.css.
===========================================================================*/

/*--------------------------------------------------------------------------
  SHELL
--------------------------------------------------------------------------*/
.auth-shell {
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	grid-template-columns: 1fr;
	background: var(--bg);
}

@media (min-width: 992px) {
	.auth-shell {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	}
}

/*--------------------------------------------------------------------------
  BRAND PANEL
--------------------------------------------------------------------------*/
.auth-aside {
	display: none;
	position: relative;
	overflow: hidden;
	background: var(--grad-deep);
	color: #fff;
	padding: 3.5rem 3rem;
	flex-direction: column;
	justify-content: space-between;
	isolation: isolate;
}

@media (min-width: 992px) {
	.auth-aside {
		display: flex;
	}
}

/* Ambient glow, and a faint grid so the panel is not a flat slab. */
.auth-aside::before {
	content: '';
	position: absolute;
	z-index: -2;
	width: 620px;
	height: 620px;
	right: -240px;
	top: -200px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(108, 110, 231, 0.42) 0%, rgba(108, 110, 231, 0) 68%);
	pointer-events: none;
}

.auth-aside::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
	-webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
	pointer-events: none;
}

.auth-aside-top {
	position: relative;
	z-index: 1;
}

.auth-aside-body {
	position: relative;
	z-index: 1;
	max-width: 27rem;
}

.auth-aside-body h2 {
	color: #fff;
	font-size: clamp(1.9rem, 2.6vw, 2.6rem);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0 0 1rem;
}

.auth-aside-body h2 em {
	font-style: normal;
	background: var(--grad-gold);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--gold-300);
}

.auth-aside-body p {
	color: rgba(255, 255, 255, 0.68);
	font-size: var(--text-md);
	line-height: 1.65;
	margin: 0 0 2rem;
}

.auth-points {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.9rem;
}

.auth-points li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--text-base);
	line-height: 1.5;
}

.auth-points i {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(108, 110, 231, 0.28);
	border: 1px solid rgba(157, 159, 240, 0.4);
	color: var(--brand-300);
	font-size: 0.7rem;
	margin-top: 2px;
}

/* Trust strip along the bottom of the panel */
.auth-aside-foot {
	position: relative;
	z-index: 1;
	display: flex;
	gap: 2.25rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-stat .auth-stat-value {
	display: block;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.auth-stat .auth-stat-label {
	display: block;
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: rgba(255, 255, 255, 0.5);
	margin-top: 0.2rem;
}

/*--------------------------------------------------------------------------
  FORM SIDE
--------------------------------------------------------------------------*/
.auth-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.25rem;
	position: relative;
	background: var(--bg);
}

@media (min-width: 992px) {
	.auth-main {
		padding: 3rem;
	}
}

/* Theme switch parked in the top-right corner of the form side. */
.auth-utility {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.auth-card {
	width: 100%;
	max-width: 27rem;
	animation: uq-rise var(--dur-slow) var(--ease-out) both;
}

.auth-card-wide {
	max-width: 40rem;
}

/* Logo above the form - only shown when the brand panel is hidden. */
.auth-card-logo {
	display: flex;
	justify-content: center;
	margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
	.auth-card-logo {
		display: none;
	}
}

.auth-head {
	margin-bottom: 1.75rem;
}

.auth-head h1 {
	font-size: clamp(1.6rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--text);
	margin: 0 0 0.5rem;
}

.auth-head p {
	color: var(--text-muted);
	font-size: var(--text-base);
	line-height: 1.6;
	margin: 0;
}

/* Small brand-tinted chip above the heading, e.g. "Admin access" */
.auth-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.75rem;
	border-radius: var(--radius-full);
	background: var(--brand-soft);
	border: 1px solid var(--brand-soft-border);
	color: var(--brand-soft-text);
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.auth-form {
	display: grid;
	gap: 1rem;
}

.auth-row {
	display: grid;
	gap: 1rem;
}

@media (min-width: 576px) {
	.auth-row-2 {
		grid-template-columns: 1fr 1fr;
	}
}

/* Remember me / forgot password line */
.auth-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: -0.25rem;
}

.auth-meta a {
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--brand-text);
}

.auth-meta a:hover {
	color: var(--brand-hover);
	text-decoration: underline;
}

.auth-foot {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	text-align: center;
	font-size: var(--text-base);
	color: var(--text-muted);
}

.auth-foot a {
	font-weight: 700;
	color: var(--brand-text);
}

.auth-foot a:hover {
	text-decoration: underline;
}

/* Legal / security microcopy under the card */
.auth-note {
	margin-top: 1.5rem;
	text-align: center;
	font-size: var(--text-xs);
	color: var(--text-subtle);
	line-height: 1.6;
}

.auth-note i {
	color: var(--success);
	margin-right: 0.25rem;
}

/*--------------------------------------------------------------------------
  ONE-TIME CODE ENTRY (verify screens)
--------------------------------------------------------------------------*/
.auth-code-input {
	text-align: center;
	font-family: var(--font-mono);
	font-size: 1.35rem !important;
	letter-spacing: 0.35em;
	font-weight: 500;
	padding-left: 1.25rem !important;
	text-indent: 0.35em;
}

.auth-code-hint {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--info-soft);
	border: 1px solid var(--info-border);
	color: var(--info-text);
	border-radius: var(--radius-sm);
	padding: 0.75rem 0.9rem;
	font-size: var(--text-sm);
	line-height: 1.5;
}

.auth-code-hint i {
	flex: none;
	font-size: 1rem;
}

/*--------------------------------------------------------------------------
  ALERTS inside the auth card
--------------------------------------------------------------------------*/
.auth-alert {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	border-radius: var(--radius-sm);
	padding: 0.8rem 1rem;
	font-size: var(--text-base);
	font-weight: 500;
	border: 1px solid transparent;
	margin-bottom: 1.25rem;
	animation: uq-rise var(--dur) var(--ease-out) both;
}

.auth-alert i {
	flex: none;
	margin-top: 1px;
}

.auth-alert-success {
	background: var(--success-soft);
	color: var(--success-text);
	border-color: var(--success-border);
}

.auth-alert-error {
	background: var(--danger-soft);
	color: var(--danger-text);
	border-color: var(--danger-border);
}

/*--------------------------------------------------------------------------
  PASSWORD STRENGTH
--------------------------------------------------------------------------*/
.pw-meter {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
	margin-top: 0.6rem;
}

.pw-meter span {
	height: 4px;
	border-radius: var(--radius-full);
	background: var(--border);
	transition: background-color var(--dur) var(--ease);
}

.pw-meter[data-score='1'] span:nth-child(-n + 1) {
	background: var(--danger);
}

.pw-meter[data-score='2'] span:nth-child(-n + 2) {
	background: var(--warning);
}

.pw-meter[data-score='3'] span:nth-child(-n + 3) {
	background: var(--info);
}

.pw-meter[data-score='4'] span {
	background: var(--success);
}

/*--------------------------------------------------------------------------
  LEGACY SUPPORT
  Auth screens not yet migrated to .auth-shell still use `.accounts`.
  Keep them on-brand and theme-aware until they are converted.
--------------------------------------------------------------------------*/
.accounts {
	min-height: 100vh;
	width: 100%;
	background: var(--grad-deep);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	font-family: var(--font-body);
}

.accounts div section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 2.5rem;
	width: 100%;
	max-width: 27rem;
	box-shadow: var(--shadow-xl);
	margin: 0 auto;
	position: relative;
	overflow: hidden;
	animation: uq-rise var(--dur-slow) var(--ease-out) both;
}

.accounts div section.auth-card-lg {
	max-width: 46rem;
}

.accounts div section.medium-auth-card {
	max-width: 40rem;
}

.accounts a img {
	height: 44px;
	width: auto;
	margin: 0 auto 1.25rem;
	display: block;
}

.accounts div section h1 {
	color: var(--text);
	font-size: 1.75rem !important;
	font-weight: 700;
	text-align: center;
	margin-bottom: 0.5rem;
	letter-spacing: -0.03em;
}

.accounts .text-muted {
	font-size: var(--text-base);
	color: var(--text-muted) !important;
	margin-bottom: 1.75rem;
	text-align: center;
}

.accounts .text-primary {
	color: var(--text-muted) !important;
	font-weight: 500;
	font-size: var(--text-base);
}

.accounts .text-primary a {
	color: var(--brand-text);
	font-weight: 700;
}

.accounts .text-primary a:hover {
	color: var(--brand-hover);
	text-decoration: underline;
}

@media (max-width: 576px) {
	.accounts {
		padding: 1.25rem 1rem;
	}

	.accounts div section {
		padding: 1.75rem 1.25rem;
	}

	.accounts div section h1 {
		font-size: 1.5rem !important;
	}
}
