*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* WordPress injects `html { margin-top: 32px }` via wp_head — kill it. */
html { margin-top: 0 !important; }

html, body {
	height: 100%;
}

body.rd-login-body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background-color: #f3f4f6;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.rd-login-wrap {
	width: 100%;
	max-width: 420px;
	padding: 20px;
}

.rd-login-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 42px 38px 36px;
	box-shadow:
		0 1px 3px rgba(0, 0, 0, 0.06),
		0 8px 32px rgba(0, 0, 0, 0.09);
}

/* Logo */
.rd-login-logo {
	display: flex;
	justify-content: center;
	margin-bottom: 26px;
}

.rd-logo-box {
	width: 52px;
	height: 52px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.rd-logo-box img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

/* Headings */
.rd-login-title {
	font-size: 26px;
	font-weight: 700;
	color: #111827;
	text-align: center;
	letter-spacing: -0.4px;
	margin-bottom: 6px;
}

.rd-login-subtitle {
	font-size: 14px;
	color: #6b7280;
	text-align: center;
	margin-bottom: 30px;
	line-height: 1.5;
}

/* Error message */
.rd-error-msg {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13.5px;
	line-height: 1.45;
	margin-bottom: 18px;
	display: none;
}

.rd-error-msg.is-visible {
	display: block;
}

/* Form */
.rd-login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.rd-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.rd-field label {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.rd-field input[type="text"],
.rd-field input[type="email"],
.rd-field input[type="password"] {
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 10px 13px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	width: 100%;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
}

.rd-field input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Remember me */
.rd-remember {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: -4px;
}

.rd-remember input[type="checkbox"] {
	width: 15px;
	height: 15px;
	cursor: pointer;
	accent-color: #16a34a;
	flex-shrink: 0;
}

.rd-remember label {
	font-size: 13px;
	color: #374151;
	cursor: pointer;
	user-select: none;
}

/* Submit button */
.rd-btn-login {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #16a34a;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	transition: background 0.15s ease, transform 0.1s ease;
	margin-top: 6px;
	letter-spacing: 0.01em;
}

.rd-btn-login:hover:not(:disabled) {
	background: #15803d;
}

.rd-btn-login:active:not(:disabled) {
	transform: scale(0.99);
}

.rd-btn-login:disabled {
	background: #86efac;
	cursor: not-allowed;
}

.rd-btn-login svg {
	flex-shrink: 0;
}

/* Footer */
.rd-login-footer {
	margin-top: 26px;
}

.rd-login-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin-bottom: 16px;
}

.rd-login-footer p {
	text-align: center;
	font-size: 13px;
	color: #6b7280;
}

.rd-login-footer a {
	color: #2563eb;
	text-decoration: none;
}

.rd-login-footer a:hover {
	text-decoration: underline;
}
