/* Auth pages (login / register) — light default, dark only under body.dark */

:root {
	--rg-primary: hsl(263.4, 70%, 50.4%);
	--rg-primary-hover: hsl(263.4, 70%, 45%);
	--rg-primary-fg: #fff;
}

/* ── Light mode (default / body:not(.dark)) ── */
html.rg-auth,
html.rg-auth body,
body.rg-auth-page,
body.rg-auth-page #wrapper,
body.rg-auth-page #container {
	--rg-bg: #f5f6f8;
	--rg-card: #ffffff;
	--rg-input: #ffffff;
	--rg-border: #e5e7eb;
	--rg-fg: #111827;
	--rg-muted: #6b7280;
	--rg-placeholder: #9ca3af;
	--rg-title: #111827;
	--rg-label: #111827;
	--rg-cancel: #111827;
	--rg-eye-hover: #111827;
	--rg-card-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
	--rg-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background: var(--rg-bg) !important;
}

body.rg-auth-page {
	min-height: 100vh;
}

html.rg-auth #sub-visual,
html.rg-auth .ety-main,
body.rg-auth-page #sub-visual,
body.rg-auth-page .ety-main {
	display: none !important;
}

html.rg-auth #ft,
html.rg-auth .ftx-footer,
html.rg-auth footer,
body.rg-auth-page #ft,
body.rg-auth-page .ftx-footer,
body.rg-auth-page .ftx-home-footer,
body.rg-auth-page footer,
body.rg-auth-page .footer-home {
	display: none !important;
}

.rg-page {
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 16px 48px;
	box-sizing: border-box;
	background: var(--rg-bg);
	color: var(--rg-fg);
	font-family: "Noto Sans KR", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rg-card {
	width: 100%;
	max-width: 420px;
	padding: 36px 32px 28px;
	border-radius: 16px;
	background: var(--rg-card);
	border: 1px solid var(--rg-border);
	box-sizing: border-box;
	box-shadow: var(--rg-card-shadow);
}

.rg-title {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--rg-title);
}

.rg-title .rg-brand {
	color: var(--rg-primary);
}

.rg-sub {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--rg-muted);
	font-weight: 400;
}

.rg-field {
	margin-bottom: 18px;
}

.rg-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--rg-label);
}

.rg-input-wrap {
	position: relative;
}

.rg-input,
.rg-select {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	box-sizing: border-box;
	border: 1px solid var(--rg-border);
	border-radius: 10px;
	background: var(--rg-input);
	color: var(--rg-fg);
	font-size: 14px;
	font-weight: 500;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rg-input::placeholder {
	color: var(--rg-placeholder);
}

.rg-input:focus,
.rg-select:focus {
	border-color: var(--rg-primary);
	box-shadow: 0 0 0 3px hsla(263.4, 70%, 50.4%, 0.18);
}

.rg-input.is-pw {
	padding-right: 48px;
}

.rg-eye {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--rg-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rg-eye:hover {
	color: var(--rg-eye-hover);
}

.rg-select {
	padding-right: 40px;
	background-image: var(--rg-select-chevron);
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.rg-select option {
	background: var(--rg-card);
	color: var(--rg-fg);
}

.rg-recommend {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.rg-recommend .rg-input {
	flex: 1;
	min-width: 0;
}

.rg-check-btn {
	flex-shrink: 0;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--rg-border);
	border-radius: 10px;
	background: #fff;
	color: var(--rg-fg);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rg-check-btn:hover:not(:disabled) {
	border-color: var(--rg-primary);
	color: var(--rg-primary);
}

.rg-check-btn:disabled,
.rg-check-btn.is-done {
	opacity: 0.85;
	cursor: default;
	border-color: var(--rg-primary);
	color: var(--rg-primary);
}

.rg-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 28px;
}

.rg-login-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.rg-actions-inline {
	margin-top: 0;
	margin-left: auto;
}

.rg-link-signup {
	color: var(--rg-primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rg-link-signup:hover {
	color: var(--rg-primary-hover);
}

.rg-btn-cancel {
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--rg-cancel);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.rg-btn-cancel:hover {
	color: var(--rg-muted);
	text-decoration: none;
}

.rg-btn-submit {
	padding: 10px 28px;
	min-width: 88px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: var(--rg-primary);
	color: var(--rg-primary-fg);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.rg-btn-submit:hover:not(:disabled) {
	background: var(--rg-primary-hover);
}

.rg-btn-submit:disabled {
	opacity: 0.55;
	cursor: wait;
}

.rg-foot {
	margin-top: 22px;
	text-align: center;
	font-size: 14px;
	color: var(--rg-muted);
}

.rg-foot a {
	color: var(--rg-muted);
	text-decoration: none;
	font-weight: 500;
}

.rg-foot a:hover {
	color: var(--rg-primary);
}

@media (max-width: 480px) {
	.rg-card {
		padding: 28px 20px 24px;
		border-radius: 14px;
	}
	.rg-title {
		font-size: 24px;
	}
	.rg-page {
		padding: 24px 12px 40px;
		min-height: calc(100vh - 56px);
	}
}

/* ── Dark mode ONLY (do not change light above) ── */
body.dark.rg-auth-page,
body.dark.rg-auth-page #wrapper,
body.dark.rg-auth-page #container,
html.rg-auth body.dark {
	--rg-bg: #0b0e11;
	--rg-card: #161a1e;
	--rg-input: #1e2329;
	--rg-border: #2b3139;
	--rg-fg: #eaecef;
	--rg-muted: #848e9c;
	--rg-placeholder: #5e6673;
	--rg-title: #ffffff;
	--rg-label: #ffffff;
	--rg-cancel: #ffffff;
	--rg-eye-hover: #ffffff;
	--rg-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	--rg-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23848e9c' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background: var(--rg-bg) !important;
}

body.dark.rg-auth-page .rg-check-btn {
	background: transparent;
}

body.dark.rg-auth-page .rg-card {
	border-color: transparent;
}
