/**
 * Parangsae Console — Shell styles
 *
 * Namespace: .pco-*  (Parangsae COnsole)
 * 메인 사이트(파랑새 홈페이지)와 완전 분리된 스코프.
 */

/* ============================================================
   Reset (콘솔 전용 — 메인 테마 스타일과 격리)
============================================================ */
.pco-shell, .pco-shell *,
.pco-login-shell, .pco-login-shell * {
	box-sizing: border-box;
}

.pco-shell, .pco-login-shell {
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #1a1d29;
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Console pages should not show site header/footer styling */
body.page-template-console-dashboard,
body.page-template-console-contents,
body.page-template-console-categories,
body.page-template-console-login {
	background: #f5f6fa;
}

/* ============================================================
   Layout — Sidebar + Main
============================================================ */
.pco-shell {
	display: flex;
	min-height: 100vh;
	background: #f5f6fa;
}

.pco-sidebar {
	width: 240px;
	background: #1a1d29;
	color: #e4e6ef;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	min-height: 100vh;
	position: sticky;
	top: 0;
}

.pco-brand {
	padding: 20px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pco-brand-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.pco-brand-mark {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #fff;
}

.pco-brand-sub {
	font-size: 11px;
	letter-spacing: 0.18em;
	color: #8a93a6;
	margin-top: 2px;
	text-transform: uppercase;
}

.pco-nav {
	flex: 1;
	padding: 12px 0;
	overflow-y: auto;
}

.pco-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pco-nav-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 24px;
	color: #b5bcce;
	text-decoration: none;
	font-size: 14px;
	transition: background 0.15s ease, color 0.15s ease;
}

.pco-nav-item a:hover {
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
}

.pco-nav-item.is-active a {
	background: linear-gradient(90deg, rgba(98, 132, 255, 0.18), rgba(98, 132, 255, 0));
	color: #fff;
	box-shadow: inset 3px 0 0 #6284ff;
}

.pco-nav-item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.pco-user {
	padding: 16px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pco-user-info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #b5bcce;
}

.pco-user-info .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.pco-logout {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #8a93a6;
	font-size: 12px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.pco-logout:hover {
	color: #ff7e7e;
}

.pco-logout .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* ============================================================
   Main
============================================================ */
.pco-main {
	flex: 1;
	padding: 32px 40px;
	min-width: 0;
}

.pco-header {
	margin-bottom: 28px;
}

.pco-header h1 {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 6px;
	color: #1a1d29;
}

.pco-header p {
	margin: 0;
	color: #6b7280;
	font-size: 14px;
}

.pco-section {
	background: #fff;
	border: 1px solid #e8eaef;
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 20px;
}

.pco-section-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 16px;
	color: #1a1d29;
}

/* ============================================================
   Stat cards
============================================================ */
.pco-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.pco-stat-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: #f8f9fb;
	border-radius: 8px;
	border: 1px solid #e8eaef;
}

.pco-stat-card > .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #6284ff;
	background: #fff;
	padding: 12px;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pco-stat-label {
	font-size: 12px;
	color: #6b7280;
	margin: 0 0 4px;
}

.pco-stat-value {
	font-size: 22px;
	font-weight: 700;
	color: #1a1d29;
	margin: 0;
}

/* ============================================================
   Buttons
============================================================ */
.pco-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	background: #fff;
	border: 1px solid #d6dae3;
	border-radius: 6px;
	color: #1a1d29;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pco-btn:hover {
	background: #f5f6fa;
	border-color: #c1c7d3;
}

.pco-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.pco-btn-primary {
	background: #6284ff;
	border-color: #6284ff;
	color: #fff;
}

.pco-btn-primary:hover {
	background: #4f6ee8;
	border-color: #4f6ee8;
	color: #fff;
}

.pco-btn-danger {
	background: #fff;
	border-color: #f5b5b5;
	color: #d04848;
}

.pco-btn-danger:hover {
	background: #fef5f5;
	border-color: #d04848;
}

.pco-btn-block {
	width: 100%;
	justify-content: center;
	padding: 11px 16px;
	font-size: 15px;
}

.pco-btn-sm {
	padding: 6px 10px;
	font-size: 13px;
}

/* ============================================================
   Quick actions
============================================================ */
.pco-quick-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ============================================================
   Empty state
============================================================ */
.pco-empty {
	text-align: center;
	padding: 60px 20px;
	color: #6b7280;
}

.pco-empty .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #c1c7d3;
	margin-bottom: 12px;
}

.pco-empty p {
	margin: 0;
	font-size: 14px;
}

/* ============================================================
   Login
============================================================ */
.pco-login-shell {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(135deg, #f5f6fa 0%, #e8ecf5 100%);
}

.pco-login-card {
	width: 100%;
	max-width: 380px;
	background: #fff;
	border: 1px solid #e8eaef;
	border-radius: 14px;
	padding: 36px 32px;
	box-shadow: 0 10px 40px rgba(26, 29, 41, 0.06);
}

.pco-login-brand {
	text-align: center;
	margin-bottom: 28px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pco-login-brand .pco-brand-mark {
	font-size: 22px;
	color: #1a1d29;
}

.pco-login-brand .pco-brand-sub {
	font-size: 11px;
	color: #8a93a6;
}

.pco-login-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 16px;
}

.pco-login-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pco-login-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: #1a1d29;
}

.pco-login-form label > span {
	font-weight: 500;
}

.pco-login-form input[type="text"],
.pco-login-form input[type="password"] {
	padding: 10px 12px;
	border: 1px solid #d6dae3;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pco-login-form input[type="text"]:focus,
.pco-login-form input[type="password"]:focus {
	border-color: #6284ff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(98, 132, 255, 0.15);
}

.pco-login-remember {
	flex-direction: row !important;
	align-items: center;
	gap: 8px !important;
	font-size: 13px;
	color: #6b7280;
}

.pco-login-foot {
	margin: 18px 0 0;
	text-align: center;
	font-size: 12px;
	color: #6b7280;
}

.pco-login-foot a {
	color: #6284ff;
	text-decoration: none;
}

.pco-login-foot a:hover {
	text-decoration: underline;
}

.pco-sep {
	margin: 0 6px;
	color: #c1c7d3;
}

/* ============================================================
   Toast
============================================================ */
.pco-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #1a1d29;
	color: #fff;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 13px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	z-index: 99999;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.22s ease, transform 0.22s ease;
	pointer-events: none;
}

.pco-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.pco-toast-error {
	background: #b91c1c;
}

.pco-toast-success {
	background: #047857;
}

/* ============================================================
   Responsive — Mobile
============================================================ */
@media (max-width: 768px) {
	.pco-shell {
		flex-direction: column;
	}

	.pco-sidebar {
		width: 100%;
		min-height: auto;
		position: static;
		flex-direction: row;
		overflow-x: auto;
	}

	.pco-brand {
		padding: 14px 20px;
		border-right: 1px solid rgba(255, 255, 255, 0.06);
		border-bottom: none;
		flex-shrink: 0;
	}

	.pco-nav {
		padding: 0;
		display: flex;
		align-items: center;
	}

	.pco-nav ul {
		display: flex;
	}

	.pco-nav-item a {
		padding: 14px 16px;
		white-space: nowrap;
	}

	.pco-nav-item.is-active a {
		box-shadow: inset 0 -3px 0 #6284ff;
	}

	.pco-user {
		border-top: none;
		border-left: 1px solid rgba(255, 255, 255, 0.06);
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 14px 20px;
		margin-left: auto;
		flex-shrink: 0;
	}

	.pco-main {
		padding: 20px;
	}
}

/* ============================================================
   ID 칩 — 콘텐츠/블로그/장비 등 리스트 페이지 공용
   클릭 시 클립보드 복사. MCP/REST 호출 시 사용할 post_id 노출용.
============================================================ */
.pco-col-id {
	width: 64px;
	white-space: nowrap;
}
.pco-id-chip {
	font-family: SFMono-Regular, Menlo, "Liberation Mono", monospace;
	font-size: 11.5px;
	color: #4a4f5c;
	background: #f0f2f7;
	border: 1px solid #e0e3eb;
	padding: 3px 8px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pco-id-chip:hover {
	background: #e0e7ff;
	border-color: #6284ff;
	color: #1e40af;
}
.pco-id-chip:active {
	background: #c7d2fe;
}
.pco-id-chip::before {
	content: "#";
	color: #9ca3af;
	margin-right: 1px;
	font-weight: 400;
}
