:root {
	--bg: #f7f7f8;
	--card: #ffffff;
	--ink: #1a1a1a;
	--muted: #6b6b6b;
	--line: #e8e8e8;
	--brand: #092753;
	--brand-dark: #061a38;
	--brand-accent: #b28672;
	--ok: #1a7a45;
	--ok-bg: #edf8f1;
	--err: #c62828;
	--err-bg: #fdecea;
	--info-bg: #f3ebe7;
}

* { box-sizing: border-box; }

body.admin-body {
	margin: 0;
	min-height: 100vh;
	font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
	color: var(--ink);
	background: var(--bg);
}

.adm-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px clamp(16px, 4vw, 28px);
	background: #fff;
	border-bottom: 1px solid var(--line);
}

.adm-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink);
	font-weight: 700;
	font-size: 16px;
}

.adm-brand img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 8px;
}

.adm-brand em {
	font-style: normal;
	font-weight: 500;
	color: var(--muted);
}

.setup-shell,
.dash-shell {
	width: min(640px, calc(100% - 32px));
	margin: 0 auto;
	padding: 28px 0 56px;
}

.setup-shell { padding-top: 48px; }

.setup-card,
.panel {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 24px;
}

.panel--main { margin-bottom: 14px; }

.setup-card__logo {
	display: flex;
	justify-content: center;
	margin-bottom: 18px;
}

.setup-card__logo a {
	display: inline-flex;
	line-height: 0;
}

.setup-card__logo img {
	width: 120px;
	height: 120px;
	object-fit: contain;
	border-radius: 16px;
}

.setup-eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--brand);
}

.setup-card__head {
	text-align: center;
}

.setup-card__head h1 {
	margin: 0;
	font-size: 22px;
	letter-spacing: -0.02em;
}

.setup-desc,
.muted {
	margin: 8px 0 0;
	color: var(--muted);
	line-height: 1.5;
	font-size: 14px;
}

.setup-form {
	display: grid;
	gap: 12px;
	margin-top: 18px;
}

.field { display: grid; gap: 6px; }

.field__label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.field input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #d6d6d6;
	border-radius: 8px;
	font: inherit;
	font-size: 15px;
	background: #fff;
}

.field input:focus {
	outline: none;
	border-color: var(--brand);
}

.setup-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 12px;
	border-radius: 8px;
	background: #fafafa;
	border: 1px solid var(--line);
}

.setup-meta div { display: grid; gap: 2px; }
.setup-meta span { font-size: 12px; color: var(--muted); }
.setup-meta strong { font-size: 14px; }

.btn-primary {
	height: 46px;
	border: 0;
	border-radius: 8px;
	background: var(--brand);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: 0.65; cursor: wait; }

.form-hint {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
}

.form-divider {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 4px 0;
}

.chat-preview {
	margin: 14px 0 0;
	word-break: break-all;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted);
}

.chat-preview a {
	color: var(--brand);
	font-weight: 600;
	text-decoration: none;
}

.alert {
	margin-top: 14px;
	padding: 11px 12px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--err { background: var(--err-bg); color: var(--err); }
.alert--info { background: var(--info-bg); color: var(--brand-dark); margin-top: 16px; }

.setup-footer {
	margin: 16px 0 0;
	text-align: center;
}

.setup-footer a,
.dash-nav a,
.alert a {
	color: var(--brand);
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
}

.dash-nav {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.panel h2 {
	margin: 0;
	font-size: 16px;
}

.panel__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ok-bg);
	color: var(--ok);
	font-size: 12px;
	font-weight: 700;
}

.kv { margin: 0; display: grid; gap: 0; }

.kv > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--line);
}

.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv > div:first-child { padding-top: 0; }

.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-size: 14px; font-weight: 600; }
.kv dd.masked {
	letter-spacing: 0.08em;
	font-variant-numeric: tabular-nums;
	color: #444;
}

@media (max-width: 720px) {
	.adm-top { flex-wrap: wrap; }
	.setup-shell, .dash-shell { padding-top: 20px; }
}
