/* ── Auth (Devise) ───────────────────────────────────────────
   Sign-in page and all Devise-rendered views.
   ─────────────────────────────────────────────────────────── */

body.devise {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 16px;
	background: radial-gradient(1200px 500px at 20% 0%, #eaf3ff 0%, #f8f7f4 45%, #f5f2ed 100%);
}

body.devise .auth-page {
	width: 100%;
	max-width: 420px;
}

body.devise .auth-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 32px;
	box-shadow: var(--shadow-md);
	animation: card-in 320ms ease-out;
}

body.devise h2 {
	margin: 0 0 20px;
	text-align: center;
	font-size: 26px;
	font-weight: 600;
	color: var(--blue-900);
	letter-spacing: 0.2px;
}

body.devise .field {
	margin-bottom: 16px;
}

body.devise .field p {
	margin: 0 0 8px;
}

body.devise .field p:last-child {
	margin-bottom: 0;
}

body.devise label {
	font-size: 14px;
	font-weight: 600;
	color: var(--blue-900);
}

body.devise input[type="email"],
body.devise input[type="password"],
body.devise input[type="text"] {
	width: 100%;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	border: 1px solid var(--blue-200);
	background: var(--blue-50);
	color: var(--ink);
	transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body.devise input[type="email"]:focus,
body.devise input[type="password"]:focus,
body.devise input[type="text"]:focus {
	border-color: var(--blue-500);
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
	background: #ffffff;
	outline: none;
}

body.devise input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--blue-600);
}

body.devise .remember-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

body.devise .remember-row p {
	margin: 0;
}

body.devise .actions {
	margin-top: 18px;
}

body.devise .actions input[type="submit"],
body.devise button {
	width: 100%;
	border: none;
	border-radius: var(--radius-md);
	padding: 12px 16px;
	background: var(--blue-600);
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
	transition: transform 120ms ease, box-shadow 120ms ease, background 150ms ease;
}

body.devise .actions input[type="submit"]:hover,
body.devise button:hover {
	background: var(--blue-700);
	transform: translateY(-1px);
}

body.devise .actions input[type="submit"]:active,
body.devise button:active {
	transform: translateY(0);
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

body.devise .auth-card > p {
	margin: 12px 0 0;
	text-align: center;
}

body.devise .auth-card > p a {
	color: var(--blue-600);
	font-weight: 600;
	text-decoration: none;
}

body.devise .auth-card > p a:hover {
	text-decoration: underline;
}

body.devise #error_explanation {
	margin-bottom: 16px;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	background: #fff5f5;
	border: 1px solid #fed7d7;
	color: #9b2c2c;
}

body.devise #error_explanation h2 {
	margin: 0 0 6px;
	text-align: left;
	font-size: 14px;
	color: #9b2c2c;
}

body.devise #error_explanation ul {
	margin: 0;
	padding-left: 18px;
}

body.devise #error_explanation li {
	font-size: 13px;
}

/* ── Password visibility toggle ─────────────────────────────── */

body.devise .password-wrapper {
	position: relative;
}

body.devise .password-wrapper input[type="password"],
body.devise .password-wrapper input[type="text"] {
	padding-right: 44px; /* room for the icon */
}

body.devise .password-toggle-btn {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	color: var(--blue-400);
	background: transparent;
	transition: color 150ms ease, background 150ms ease;
	user-select: none;
}

body.devise .password-toggle-btn:hover {
	color: var(--blue-700);
	background: var(--blue-50);
}

body.devise .password-toggle-btn svg {
	width: 18px;
	height: 18px;
	pointer-events: none;
}

body.devise .password-toggle-btn .hidden {
	display: none;
}
