:root {
	--bg: #0f172a;
	--card: #111827;
	--accent: #22d3ee;
	--accent-2: #4ade80;
	--success: #4ade80;
	--success-soft: #bbf7d0;
	--error-soft: #fecdd3;
	--text: #e5e7eb;
	--muted: #94a3b8;
	--danger: #f87171;
	--warning: #fbbf24;
	--surface-strong: #111c2c;
	--surface-muted: #0f1b2a;
	--border-color: rgba(255, 255, 255, 0.08);
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	font-family:
		'Inter',
		'Pretendard',
		'Apple SD Gothic Neo',
		system-ui,
		-apple-system,
		sans-serif;
	background:
		radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.15), transparent 25%),
		radial-gradient(circle at 80% 0%, rgba(74, 222, 128, 0.12), transparent 30%), var(--bg);
	color: var(--text);
	min-height: 100vh;
}
header {
	padding: 1rem 5vw;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	backdrop-filter: blur(12px);
	background: rgba(15, 23, 42, 0.7);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	z-index: 10;
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-decoration: none;
	color: var(--text);
}
.brand .dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}
nav a,
nav form button {
	color: var(--muted);
	text-decoration: none;
	margin-left: 1rem;
	font-weight: 600;
}
nav a:hover,
nav form button:hover {
	color: var(--text);
}
nav form {
	display: inline;
}
nav form button {
	background: none;
	border: none;
	cursor: pointer;
}
main {
	padding: 2rem 5vw 3rem;
	display: flex;
	flex-direction: column;
	align-items: center; /* 중앙 정렬을 위해 추가 */
}
.card {
	background: var(--card);
	border: 1px solid rgba(255, 255, 255, 0.04);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
	border-radius: 18px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	width: 100%; /* 기본 100% */
}
/* 로그인/회원가입 카드용 유틸리티 */
.card-auth {
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}
h1,
h2,
h3 {
	margin: 0 0 1rem;
	color: #f8fafc;
}
form label {
	display: block;
	margin: 0.6rem 0 0.25rem;
	font-weight: 600;
}
input,
select,
textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border-radius: 12px;
	border: 1px solid var(--border-color);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--accent);
	border-color: var(--accent);
}
button,
.btn {
	display: inline-block;
	padding: 0.75rem 1.1rem;
	border-radius: 12px;
	border: none;
	font-weight: 700;
	cursor: pointer;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #0b1120;
	text-decoration: none;
	text-align: center;
}
button.secondary,
.btn.secondary {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
button:disabled,
.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.grid {
	display: grid;
	gap: 1rem;
}
.grid.two {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
	gap: 1rem;
}
.panel {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.04);
	border-radius: 14px;
	padding: 0.75rem;
}
.section-title {
	font-weight: 700;
	color: var(--muted);
	margin-bottom: 0.35rem;
}
.badges-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.stack {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.input-static {
	background: rgba(255, 255, 255, 0.03);
	border-style: dashed;
	color: var(--muted);
}
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.85rem;
}
.badge-google {
	background: #e8f0fe;
	color: #174ea6;
}
.badge-naver {
	background: #e6f4ea;
	color: #0a8a38;
}

/* filter bar */
.filter-bar {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.filter-bar .filter-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
}
.filter-bar .filter-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.flash {
	padding: 1rem 1.2rem;
	border-radius: 12px;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
}
.flash.success {
	background: rgba(74, 222, 128, 0.1);
	color: var(--success-soft);
}
.flash.error {
	background: rgba(248, 113, 113, 0.12);
	color: var(--error-soft);
}
table {
	width: 100%;
	border-collapse: collapse;
}
th,
td {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-align: left;
}
th {
	color: var(--muted);
	font-weight: 700;
}
td {
	color: var(--text);
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	color: var(--text);
	font-size: 0.85rem;
}
.text-muted {
	color: var(--muted);
}
.avatar {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.05);
}
.register-grid .inline-group {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.6rem;
	align-items: center;
}

/* Paper viewer (admin/user shared atoms) */
.paper-view-card {
	max-width: 960px;
	margin: 0 auto;
	background: var(--surface-strong);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.paper-view-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 6px;
	color: #f8fafc;
}
.paper-view-meta {
	color: #94a3b8;
	margin-bottom: 16px;
}
.paper-view-label {
	font-weight: 700;
	margin-top: 12px;
	display: block;
	color: #f1f5f9;
}
.paper-view-text {
	background: var(--surface-muted);
	color: #e2e8f0;
	border: 1px solid #1f2937;
	border-radius: 12px;
	padding: 12px;
}
.paper-view-actions {
	margin-top: 16px;
	display: flex;
	gap: 10px;
}
.register-grid .form-inline {
	margin-bottom: 0.8rem;
}
.text-success {
	color: var(--success);
}
.text-error {
	color: var(--danger);
}
.status {
	margin-top: 0.35rem;
	min-height: 1.25rem;
	display: block;
}
.sticky-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	position: sticky;
	top: 72px;
	z-index: 5;
}
.admin-nav {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	position: sticky;
	top: 72px;
	z-index: 6;
	align-items: center;
}
.admin-nav__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	width: 100%;
	justify-content: flex-start;
}
.admin-nav__row + .admin-nav__row {
	margin-top: 0.2rem;
}
.admin-nav .btn.secondary {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 유틸리티 클래스 */
.mt-2 {
	margin-top: 0.5rem;
}
.mt-4 {
	margin-top: 1rem;
}
.mt-6 {
	margin-top: 1.5rem;
}
.pt-4 {
	padding-top: 1rem;
}
.border-t-muted {
	border-top: 1px solid var(--border-color);
}
.flex-col {
	flex-direction: column;
}
.gap-2 {
	gap: 0.5rem;
}
.flex-center {
	display: flex;
	align-items: center;
	justify-content: center;
}
.w-full {
	width: 100%;
}
.px-4 {
	padding-left: 1rem;
	padding-right: 1rem;
}
.py-3 {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

/* 소셜 로그인 버튼 */
.btn-social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
}
.btn-social.google {
	background: #fff;
	border: 1px solid #dcdcdc;
	color: #222;
}
.btn-social.naver {
	background: #03c75a;
	border: 1px solid #03c75a;
	color: #fff;
	font-weight: 700;
}
.icon-google {
	display: inline-block;
	width: 20px;
	height: 20px;
	background: url('https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg') center/contain no-repeat;
}
.icon-naver {
	display: inline-block;
	width: 18px;
	height: 18px;
	background: #fff;
	color: #03c75a;
	border-radius: 4px;
	font-weight: 900;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.link-accent {
	color: var(--accent);
	text-decoration: none;
}

@media (max-width: 640px) {
	header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	nav a {
		margin-left: 0.5rem;
	}
	.register-grid .inline-group {
		grid-template-columns: 1fr;
	}
}
