/* Login + Sign Up: form left, brand panel right (below on mobile). Tokens from base.css. */

.auth {
	display: grid;
}

.auth__main {
	display: grid;
	place-items: center;
	padding: clamp(40px, 7vw, 96px) var(--pad-x);
}

.auth__box {
	width: min(100%, 440px);
	display: grid;
	gap: var(--s-5);
}

.auth__head { display: grid; gap: var(--s-3); }
.auth__head h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.auth__head p { color: var(--muted); }

.auth__form { display: grid; gap: var(--s-5); }

.auth__label-row {
	display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
}
.auth__small-link { font-size: var(--fs-sm); font-weight: 600; }

/* Password + toggle */
.auth__password { position: relative; }
.auth__password input { padding-right: 56px; }
.auth__toggle {
	position: absolute; top: 2px; right: 2px; bottom: 2px; width: 48px;
	display: grid; place-items: center;
	border-radius: var(--r-md); color: var(--muted);
	transition: color .2s var(--ease), background-color .2s var(--ease);
}
.auth__toggle[hidden] { display: none; }
.auth__toggle:hover { color: var(--ink); background: var(--brand-soft); }
.auth__toggle svg { width: 20px; height: 20px; }
.auth__toggle .icon--eye-off { display: none; }
.auth__toggle[aria-pressed="true"] .icon--eye { display: none; }
.auth__toggle[aria-pressed="true"] .icon--eye-off { display: block; }

/* Remember me */
.auth__check {
	display: inline-flex; align-items: center; gap: var(--s-3);
	min-height: 44px; width: fit-content; cursor: pointer;
	font-size: var(--fs-sm); font-weight: 500; color: var(--ink);
}
.auth__check input {
	width: 20px; height: 20px; margin: 0; flex: none;
	accent-color: var(--brand-strong); cursor: pointer;
}

.auth__consent { font-size: var(--fs-sm); color: var(--muted); text-align: center; }
.auth__alt { text-align: center; color: var(--muted); }
.auth__alt a, .auth__consent a { font-weight: 600; }

.auth .icon-tile { margin-bottom: var(--s-2); }

/* Firebase: Google button, divider, status notice, check-your-inbox state */
.auth__social { display: grid; gap: var(--s-5); }
.auth__social[hidden], .auth__status[hidden], .auth__inbox[hidden] { display: none; }
.auth__google {
	gap: var(--s-3);
	background: var(--bg); color: var(--ink); border-color: var(--border);
	font-weight: 600;
}
.auth__google:hover { background: var(--surface); border-color: var(--ink); }
.auth__google .auth__google-icon { width: 20px; height: 20px; flex: none; }
.auth__google.is-loading { opacity: .6; pointer-events: none; }

.auth__divider {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3);
	color: var(--muted); font-size: var(--fs-sm);
}
.auth__divider::before, .auth__divider::after { content: ""; height: 1px; background: var(--border); }

.form-notice--warning { background: #FFFAEB; color: #93370D; }
.form-notice--info { background: var(--brand-soft); color: var(--ink); }
.auth__status { display: grid; gap: var(--s-3); overflow-wrap: anywhere; }
.auth__status-actions { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; }

.auth__linkbtn {
	padding: 0; border: 0; background: none; cursor: pointer;
	font: inherit; font-weight: 600; color: var(--brand-strong);
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
	min-height: 24px;
}
.auth__linkbtn:hover { color: var(--ink); }
.auth__linkbtn[disabled] { opacity: .5; pointer-events: none; }

.auth__inbox { display: grid; gap: var(--s-4); outline: none; }
.auth__inbox h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.auth__inbox p { color: var(--muted); overflow-wrap: anywhere; }
.auth__inbox strong { color: var(--ink); }
.auth__box.is-inbox > :not(.auth__inbox) { display: none; }

.auth__form .btn.is-loading { opacity: .6; pointer-events: none; }

/* Brand panel */
.auth__panel {
	display: grid; align-items: center;
	padding: clamp(40px, 7vw, 96px) var(--pad-x);
	background:
		radial-gradient(90% 70% at 100% 0%, rgba(72, 117, 255, .45) 0%, transparent 60%),
		radial-gradient(80% 60% at 0% 100%, rgba(45, 91, 255, .3) 0%, transparent 60%),
		var(--ink);
	color: rgba(255, 255, 255, .78);
	border-bottom: 1px solid rgba(255, 255, 255, .1); /* separates panel from the dark footer */
}
.auth__panel-inner { display: grid; gap: var(--s-5); width: min(100%, 520px); }
.auth__panel h2 { color: #fff; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.auth__panel .badge { width: fit-content; background: rgba(72, 117, 255, .18); color: #C7D4FF; }

.auth__benefits { display: grid; gap: var(--s-4); margin-top: var(--s-2); }
.auth__benefits li {
	display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: var(--s-4);
	padding: var(--s-4); border-radius: var(--r-md);
	background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
}
.auth__benefits svg {
	width: 40px; height: 40px; padding: 9px; border-radius: var(--r-sm);
	background: rgba(72, 117, 255, .2); color: #A9BEFF;
}
.auth__benefits strong { color: #fff; font-weight: 600; }

@media (min-width: 1024px) {
	.auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100svh - var(--header-h)); }
	.auth__panel { justify-items: center; }
}
