#pcd-dashboard-root {
	position: relative;
	z-index: 999999;
}

body.pcd-dashboard-open {
	overflow: hidden;
}

/* Dashboard: a full page takeover, not a popup. */
.pcd-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Submission details: an actual popup on top of the dashboard page. */
.pcd-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.pcd-card {
	background: #ffffff;
	width: 100%;
	height: 100%;
	max-width: 1080px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.pcd-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 28px;
	border-bottom: 1px solid #eef2f6;
	background: linear-gradient(135deg, #0d79bd 0%, #095a8f 100%);
	color: #ffffff;
}

.pcd-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.pcd-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pcd-close {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pcd-close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.pcd-header .pcd-btn-ghost {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border-color: transparent;
}
.pcd-header .pcd-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.28);
}

.pcd-btn {
	font-size: 13px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 8px;
	border: 1px solid #d7dee6;
	cursor: pointer;
	background: #fff;
	color: #0f172a;
}
.pcd-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.pcd-btn-ghost {
	background: #f8fafc;
}
.pcd-btn-ghost:hover {
	background: #eef2f6;
}

/* Tabs / search */
.pcd-tabs-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 28px 0;
	flex-wrap: wrap;
}
.pcd-tabs {
	display: flex;
	gap: 6px;
	background: #f1f5f9;
	padding: 4px;
	border-radius: 10px;
}
.pcd-tab {
	border: none;
	background: transparent;
	padding: 9px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
}
.pcd-tab.is-active {
	background: #ffffff;
	color: #0d79bd;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.pcd-search {
	padding: 9px 14px;
	border-radius: 8px;
	border: 1px solid #d7dee6;
	font-size: 13px;
	min-width: 240px;
	flex: 1;
	max-width: 320px;
}
.pcd-search:focus {
	outline: none;
	border-color: #0d79bd;
}

/* List */
.pcd-list-wrap {
	padding: 18px 28px;
	overflow-y: auto;
	flex: 1;
}
.pcd-empty {
	padding: 60px 0;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
}
.pcd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.pcd-table thead th {
	text-align: left;
	padding: 10px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	border-bottom: 2px solid #eef2f6;
	position: sticky;
	top: 0;
	background: #fff;
}
.pcd-row {
	cursor: pointer;
	transition: background 0.12s ease;
}
.pcd-row:hover,
.pcd-row:focus {
	background: #f8fafc;
	outline: none;
}
.pcd-row td {
	padding: 12px;
	border-bottom: 1px solid #eef2f6;
	color: #0f172a;
	vertical-align: top;
}
.pcd-cell-name {
	font-weight: 600;
	white-space: nowrap;
}
.pcd-cell-snippet {
	color: #64748b;
	max-width: 320px;
}
.pcd-cell-date {
	color: #94a3b8;
	white-space: nowrap;
}
.pcd-badge {
	display: inline-block;
	padding: 3px 10px;
	background: rgba(13, 121, 189, 0.1);
	color: #0d79bd;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

/* Pagination */
.pcd-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 14px 28px 22px;
}
.pcd-page-label {
	font-size: 13px;
	color: #64748b;
}

/* Modal */
.pcd-modal {
	background: #fff;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.pcd-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid #eef2f6;
}
.pcd-modal-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}
.pcd-modal-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}
.pcd-modal-actions .pcd-close {
	background: #f1f5f9;
	color: #475569;
}
.pcd-modal-actions .pcd-close:hover {
	background: #e2e8f0;
}
.pcd-modal-body {
	padding: 10px 22px 22px;
	overflow-y: auto;
}
.pcd-field {
	padding: 12px 0;
	border-bottom: 1px solid #eef2f6;
}
.pcd-field:last-child {
	border-bottom: none;
}
.pcd-field-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 6px;
}
.pcd-field-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.pcd-field-value {
	flex: 1;
	font-size: 14px;
	color: #0f172a;
	word-break: break-word;
	overflow-wrap: anywhere;
	line-height: 1.5;
}
.pcd-field-multiline {
	white-space: pre-wrap;
}
.pcd-field-link {
	color: #0d79bd;
	text-decoration: underline;
}
.pcd-copy-btn {
	flex-shrink: 0;
	border: 1px solid #d7dee6;
	background: #f8fafc;
	color: #0f172a;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 7px;
	cursor: pointer;
}
.pcd-copy-btn:hover {
	background: #eef2f6;
}
.pcd-copy-btn.pcd-copied {
	background: #dcfce7;
	border-color: #86efac;
	color: #15803d;
}

@media (max-width: 640px) {
	.pcd-header {
		padding: 16px 18px;
	}
	.pcd-tabs-row {
		padding: 14px 18px 0;
	}
	.pcd-list-wrap {
		padding: 14px 18px;
	}
	.pcd-table {
		display: block;
		overflow-x: auto;
	}
}
