:root {
	--jcfdp-bg-1: linear-gradient(135deg, #091b2a 0%, #10324e 58%, #1c5d72 100%);
	--jcfdp-bg-2: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
	--jcfdp-surface: rgba(10, 22, 36, 0.82);
	--jcfdp-card: rgba(255, 255, 255, 0.82);
	--jcfdp-ink: #0b1a2f;
	--jcfdp-muted: #5a6d84;
	--jcfdp-accent: #0cce96;
	--jcfdp-accent-2: #ffbf5d;
	--jcfdp-danger: #e45656;
	--jcfdp-radius: 12px;
	--jcfdp-shadow: 0 24px 48px rgba(6, 20, 35, 0.18);
}

.jcfdp-shell {
	margin: 16px 0 24px;
	display: grid;
	gap: 18px;
}

.jcfdp-shell--touch {
	margin-left: 2.5%;
	margin-right: 2.5%;
}

.jcfdp-card-shell {
	position: relative;
	overflow: hidden;
	padding: 12px;
	border-radius: var(--jcfdp-radius);
	background: rgba(11, 26, 47, 0.04);
	border: 1px solid rgba(11, 26, 47, 0.08);
	box-shadow: 0 16px 40px rgba(6, 20, 35, 0.08);
}

.jcfdp-card-shell::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--jcfdp-bg-2);
	pointer-events: none;
}

.jcfdp-card-shell > * {
	position: relative;
}

.jcfdp-shell--editor,
.jcfdp-shell--index,
.jcfdp-shell--admin {
	margin-top: 20px;
}

.jcfdp-card {
	position: relative;
	overflow: hidden;
	padding: 22px 24px;
	border-radius: var(--jcfdp-radius);
	background: var(--jcfdp-card);
	color: var(--jcfdp-ink);
}

.jcfdp-card--hero {
	background: var(--jcfdp-bg-1);
	color: #fff;
}

.jcfdp-card--hero::after {
	content: "";
	position: absolute;
	right: -80px;
	top: -80px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}

.jcfdp-eyebrow {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	opacity: 0.72;
	margin-bottom: 12px;
}

.jcfdp-title,
.jcfdp-subtitle {
	margin: 0;
	font-family: Aptos, "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
	font-weight: 700;
	line-height: 1.15;
}

.jcfdp-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.jcfdp-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.94) !important;
	text-decoration: none !important;
	flex: 0 0 auto;
	transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.jcfdp-back:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.16);
	box-shadow: 0 10px 20px rgba(9, 27, 42, 0.16);
}

.jcfdp-back svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.jcfdp-title {
	font-size: 28px;
}

.jcfdp-subtitle {
	font-size: 20px;
	margin-bottom: 12px;
}

.jcfdp-copy {
	margin: 10px 0 0;
	line-height: 1.75;
	color: inherit;
	opacity: 0.95;
}

.jcfdp-hero-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.jcfdp-shell--index .jcfdp-hero-head {
	align-items: center;
}

.jcfdp-shell--index .jcfdp-subtitle {
	flex: 1 1 auto;
	min-width: 0;
	margin-bottom: 0;
	display: flex;
	align-items: center;
	min-height: 34px;
}

.jcfdp-shell--index .jcfdp-subtitle a {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jcfdp-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.jcfdp-metrics--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jcfdp-metric {
	padding: 16px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
}

.jcfdp-card:not(.jcfdp-card--hero) .jcfdp-metric {
	background: rgba(11, 26, 47, 0.05);
}

.jcfdp-metric span,
.jcfdp-metric em {
	display: block;
	font-style: normal;
	font-size: 12px;
	opacity: 0.75;
}

.jcfdp-metric strong {
	display: block;
	margin: 8px 0 4px;
	font-size: 24px;
}

.jcfdp-progress {
	height: 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	overflow: hidden;
	margin-top: 18px;
}

.jcfdp-card:not(.jcfdp-card--hero) .jcfdp-progress {
	background: rgba(11, 26, 47, 0.08);
}

.jcfdp-progress-bar {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--jcfdp-accent), #74f0ca);
}

/* Index list cards use the in-thread embed progress bar styling. */
.jcfdp-shell--index .jcfdp-progress {
	height: auto;
	background: transparent;
	overflow: visible;
}

.jcfdp-shell--index .jcfdp-progress__track {
	height: 12px;
	overflow: hidden;
	border-radius: 999px;
	background: #edf1f7;
}

.jcfdp-shell--index .jcfdp-progress__bar {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #79d1a2 0%, #4ac08f 100%);
}

.jcfdp-meta,
.jcfdp-actions,
.jcfdp-resource {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 16px;
}

.jcfdp-meta span,
.jcfdp-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	font-size: 12px;
}

.jcfdp-card:not(.jcfdp-card--hero) .jcfdp-meta span,
.jcfdp-card:not(.jcfdp-card--hero) .jcfdp-chip {
	background: rgba(11, 26, 47, 0.06);
}

.jcfdp-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 112px;
	padding: 10px 14px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.jcfdp-status svg {
	width: 14px;
	height: 14px;
	margin-right: 6px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.jcfdp-status--0 {
	background: rgba(12, 206, 150, 0.16);
	color: #0c815f;
	border-color: rgba(12, 129, 95, 0.24);
}

.jcfdp-status--1 {
	background: rgba(255, 191, 93, 0.18);
	color: #9c6512;
	border-color: rgba(156, 101, 18, 0.22);
}

.jcfdp-status--2 {
	background: rgba(77, 121, 216, 0.14);
	color: #3862bf;
	border-color: rgba(56, 98, 191, 0.22);
}

.jcfdp-status--3 {
	background: rgba(29, 181, 123, 0.16);
	color: #157853;
	border-color: rgba(21, 120, 83, 0.24);
}

.jcfdp-status--4 {
	background: rgba(228, 86, 86, 0.12);
	color: #b53a3a;
	border-color: rgba(181, 58, 58, 0.2);
}

.jcfdp-status--5 {
	background: rgba(116, 96, 155, 0.14);
	color: #624d8f;
	border-color: rgba(98, 77, 143, 0.22);
}

.jcfdp-status--6 {
	background: rgba(255, 143, 83, 0.16);
	color: #b95c24;
	border-color: rgba(185, 92, 36, 0.24);
}

.jcfdp-status--7 {
	background: rgba(77, 121, 216, 0.14);
	color: #3862bf;
	border-color: rgba(56, 98, 191, 0.22);
}

/* Index list cards use the in-thread embed status badge palette. */
.jcfdp-shell--index .jcfdp-status {
	min-width: 0;
	min-height: 34px;
	padding: 0 12px;
	line-height: 1;
	white-space: nowrap;
	flex: 0 0 auto;
}

.jcfdp-shell--index .jcfdp-status--0 {
	background: #eaf9f0;
	color: #2c8c5a;
	border-color: rgba(44, 140, 90, 0.24);
}

.jcfdp-shell--index .jcfdp-status--1 {
	background: #fff6e7;
	color: #cc8b19;
	border-color: rgba(204, 139, 25, 0.22);
}

.jcfdp-shell--index .jcfdp-status--2 {
	background: #edf4ff;
	color: #4d79d8;
	border-color: rgba(77, 121, 216, 0.22);
}

.jcfdp-shell--index .jcfdp-status--3 {
	background: #eaf9f0;
	color: #19734a;
	border-color: rgba(25, 115, 74, 0.24);
}

.jcfdp-shell--index .jcfdp-status--4 {
	background: #fff1f1;
	color: #b65d5d;
	border-color: rgba(182, 93, 93, 0.22);
}

.jcfdp-shell--index .jcfdp-status--5 {
	background: #f3eefc;
	color: #7252b6;
	border-color: rgba(114, 82, 182, 0.22);
}

.jcfdp-shell--index .jcfdp-status--6 {
	background: #fff1e8;
	color: #c96f2e;
	border-color: rgba(201, 111, 46, 0.24);
}

.jcfdp-shell--index .jcfdp-status--7 {
	background: #edf4ff;
	color: #4d79d8;
	border-color: rgba(77, 121, 216, 0.22);
}

.jcfdp-pagination {
	margin-top: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.jcfdp-pagination__pages {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.jcfdp-pagebtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: 10px 12px;
	border-radius: var(--jcfdp-radius);
	border: 1px solid rgba(11, 26, 47, 0.12);
	background: rgba(255, 255, 255, 0.9);
	color: var(--jcfdp-ink) !important;
	text-decoration: none !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	transition: transform .18s ease, box-shadow .18s ease;
}

.jcfdp-pagebtn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(9, 27, 42, 0.12);
}

.jcfdp-pagebtn--active {
	background: linear-gradient(135deg, #0a1f31, #2b6075);
	border-color: rgba(255, 139, 83, 0.3);
	color: #fff !important;
}

.jcfdp-pagebtn--disabled {
	opacity: 0.4;
	transform: none;
	box-shadow: none;
	cursor: not-allowed;
}

.jcfdp-pagebtn--disabled:hover {
	transform: none;
	box-shadow: none;
}

.jcfdp-pagebtn--ellipsis {
	min-width: 24px;
	padding: 10px 6px;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.jcfdp-pagebtn--ellipsis:hover {
	transform: none;
	box-shadow: none;
}

.jcfdp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	border-radius: 999px;
	text-decoration: none !important;
	border: 0;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease;
}

.jcfdp-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(9, 27, 42, 0.16);
}

.jcfdp-btn--primary {
	background: linear-gradient(135deg, var(--jcfdp-accent-2), #ff8b53);
	color: #1d1303 !important;
}

.jcfdp-btn--ghost {
	background: rgba(255, 255, 255, 0.14);
	color: inherit !important;
}

.jcfdp-editor-grid,
.jcfdp-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.jcfdp-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.jcfdp-field--wide {
	grid-column: 1 / -1;
}

.jcfdp-field--toggle {
	flex-direction: row;
	align-items: center;
	grid-column: 1 / -1;
}

.jcfdp-field span {
	font-size: 12px;
	opacity: 0.82;
}

.jcfdp-field input,
.jcfdp-field textarea,
.jcfdp-admin-form textarea,
.jcfdp-admin-form select {
	width: 100%;
	box-sizing: border-box;
	border-radius: 16px;
	border: 1px solid rgba(11, 26, 47, 0.12);
	padding: 12px 14px;
	background: rgba(255, 255, 255, 0.92);
	color: #10233d;
}

.jcfdp-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jcfdp-admin-form {
	display: grid;
	gap: 8px;
}

.jcfdp-shell .dt {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.jcfdp-shell .dt th,
.jcfdp-shell .dt td {
	padding: 12px 10px;
	border-bottom: 1px solid rgba(11, 26, 47, 0.08);
	text-align: left;
	vertical-align: top;
}

.jcfdp-shell .dt th {
	font-weight: 700;
	color: var(--jcfdp-muted);
}

@media (max-width: 900px) {
	.jcfdp-card-shell {
		padding: 10px;
		border-radius: var(--jcfdp-radius);
	}

	.jcfdp-metrics,
	.jcfdp-editor-grid,
	.jcfdp-grid {
		grid-template-columns: 1fr;
	}

	.jcfdp-title {
		font-size: 24px;
	}

	.jcfdp-hero-head {
		flex-direction: column;
	}
}
