.tshp-vehicle-draft {
	--tv-bg: #f6f7f9;
	--tv-panel: #fff;
	--tv-ink: #111827;
	--tv-muted: #667085;
	--tv-line: #e5e7eb;
	--tv-blue: #0f5d9d;
	--tv-blue-2: #0b4779;
	--tv-green: #16a34a;
	max-width: 1180px;
	margin: 0 auto;
	padding: 28px 18px 64px;
	color: var(--tv-ink);
}

.tshp-vehicle-draft * {
	box-sizing: border-box;
}

.tshp-vehicle-hero,
.tshp-vehicle-card,
.tshp-vehicle-preview__card,
.tshp-vehicle-empty {
	border: 1px solid var(--tv-line);
	border-radius: 16px;
	background: var(--tv-panel);
	box-shadow: 0 10px 34px rgba(15, 23, 42, .05);
}

.tshp-vehicle-hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 18px;
	padding: 24px;
}

.tshp-vehicle-kicker {
	margin: 0 0 8px;
	color: var(--tv-blue);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
}

.tshp-vehicle-hero h1,
.tshp-vehicle-empty h1 {
	margin: 0;
	font-size: 30px;
	font-weight: 850;
	line-height: 1.15;
	letter-spacing: 0;
}

.tshp-vehicle-hero p:last-child,
.tshp-vehicle-empty p {
	max-width: 720px;
	margin: 9px 0 0;
	color: var(--tv-muted);
	font-size: 14px;
	line-height: 1.7;
}

.tshp-vehicle-hero__actions {
	display: flex;
	flex: none;
	gap: 10px;
}

.tshp-vbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid var(--tv-line);
	border-radius: 999px;
	background: #fff;
	color: var(--tv-ink);
	cursor: pointer;
	font-weight: 800;
	text-decoration: none;
}

.tshp-vbtn:hover,
.tshp-vbtn:focus {
	color: var(--tv-ink);
	box-shadow: 0 0 0 3px rgba(15, 93, 157, .16);
	outline: none;
}

.tshp-vbtn--primary {
	border-color: var(--tv-blue);
	background: var(--tv-blue);
	color: #fff;
}

.tshp-vbtn--primary:hover,
.tshp-vbtn--primary:focus {
	color: #fff;
	background: var(--tv-blue-2);
}

.tshp-vbtn[disabled] {
	opacity: .58;
	cursor: not-allowed;
}

.tshp-vehicle-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 18px;
	align-items: start;
}

.tshp-vehicle-main {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.tshp-vehicle-card {
	padding: 22px;
}

.tshp-vehicle-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.tshp-vehicle-card h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 850;
	line-height: 1.25;
	letter-spacing: 0;
}

.tshp-vehicle-card__head p {
	margin: 5px 0 0;
	color: var(--tv-muted);
	font-size: 13px;
	line-height: 1.6;
}

.tshp-vehicle-badge {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 11px;
	border-radius: 999px;
	background: #eef2f7;
	color: #344054;
	font-size: 12px;
	font-weight: 850;
	white-space: nowrap;
}

.tshp-vehicle-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	margin-right: 7px;
	border-radius: 999px;
	background: currentColor;
}

.tshp-vehicle-badge.is-ok {
	background: #ecfdf3;
	color: var(--tv-green);
}

.tshp-vehicle-badge.is-warn {
	background: #fffbeb;
	color: #b45309;
}

.tshp-vehicle-certgrid,
.tshp-vehicle-seed,
.tshp-vehicle-formgrid,
.tshp-vehicle-uploadgrid {
	display: grid;
	gap: 12px;
}

.tshp-vehicle-certgrid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tshp-vehicle-certgrid div,
.tshp-vehicle-uploadgrid div {
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--tv-line);
	border-radius: 12px;
	background: #fbfcfe;
}

.tshp-vehicle-certgrid span,
.tshp-vehicle-uploadgrid span {
	display: block;
	color: var(--tv-muted);
	font-size: 12px;
	line-height: 1.45;
}

.tshp-vehicle-certgrid strong,
.tshp-vehicle-uploadgrid strong {
	display: block;
	margin-top: 4px;
	font-size: 15px;
	font-weight: 850;
	overflow-wrap: anywhere;
}

.tshp-vehicle-seed,
.tshp-vehicle-formgrid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tshp-vehicle-seed label,
.tshp-vehicle-formgrid label,
.tshp-vehicle-wide {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.tshp-vehicle-seed label span,
.tshp-vehicle-formgrid label span,
.tshp-vehicle-wide span {
	color: #344054;
	font-size: 13px;
	font-weight: 800;
}

.tshp-vehicle-seed input,
.tshp-vehicle-formgrid input,
.tshp-vehicle-formgrid select,
.tshp-vehicle-wide textarea {
	width: 100%;
	min-height: 44px;
	padding: 0 13px;
	border: 1px solid #d0d5dd;
	border-radius: 11px;
	background: #fff;
	color: var(--tv-ink);
	font-size: 15px;
	box-shadow: none;
}

.tshp-vehicle-seed input[readonly] {
	background: #f8fafc;
	color: #344054;
}

.tshp-vehicle-wide {
	margin-top: 14px;
}

.tshp-vehicle-wide textarea {
	min-height: 128px;
	padding-top: 12px;
	line-height: 1.6;
	resize: vertical;
}

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

.tshp-vehicle-uploadgrid div {
	display: grid;
	min-height: 112px;
	align-content: center;
	border-style: dashed;
	text-align: center;
}

.tshp-vehicle-preview {
	position: sticky;
	top: 22px;
	min-width: 0;
}

.tshp-vehicle-preview__card {
	overflow: hidden;
}

.tshp-vehicle-preview__media {
	display: grid;
	aspect-ratio: 4 / 3;
	place-items: center;
	background: linear-gradient(135deg, #eef2f7, #dbe4ee);
	color: #667085;
	font-weight: 850;
}

.tshp-vehicle-preview__body {
	padding: 18px;
}

.tshp-vehicle-preview__body h2 {
	margin: 14px 0 10px;
	font-size: 20px;
	font-weight: 850;
	line-height: 1.3;
}

.tshp-vehicle-preview__price {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 850;
}

.tshp-vehicle-preview ul {
	display: grid;
	gap: 7px;
	margin: 0;
	padding: 0;
	color: var(--tv-muted);
	list-style: none;
}

.tshp-vehicle-preview__note {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--tv-line);
	color: var(--tv-muted);
	font-size: 12px;
	line-height: 1.6;
}

.tshp-vehicle-empty {
	max-width: 720px;
	margin: 40px auto;
	padding: 30px;
	text-align: center;
}

.tshp-vehicle-empty .tshp-vbtn {
	margin-top: 20px;
}

/* ===== P2P listing form (real form, replaces the old mockup) ===== */
.tshp-car-form__form {
	display: grid;
	gap: 14px;
}

.tshp-car-form .tshp-vehicle-cert,
.tshp-car-form .tshp-car-promo {
	margin-bottom: 14px;
}

.tshp-car-form__errors {
	border: 1px solid #fecaca;
	border-radius: 12px;
	background: #fef2f2;
	color: #b42318;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.6;
	display: grid;
	gap: 4px;
}

/* display:grid above overrides the HTML `hidden` attribute's UA display:none,
   so the empty error container leaked as a permanent pink box on every load.
   Honour `hidden` explicitly — the box only shows once JS unhides it on error. */
.tshp-car-form__errors[hidden] {
	display: none;
}

.tshp-car-form .is-field-err input,
.tshp-car-form .is-field-err select,
.tshp-car-form .is-field-err textarea {
	border-color: #f04438;
	box-shadow: 0 0 0 3px rgba(240, 68, 56, .12);
}

.tshp-car-form__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 4px;
}

/* Tesla 認證 promo (advanced feature) */
.tshp-car-promo {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 18px 22px;
	border: 1px solid #c7def0;
	border-radius: 16px;
	background: linear-gradient(120deg, #eef6fd, #f7fbff);
	box-shadow: 0 10px 34px rgba(15, 23, 42, .05);
}

.tshp-car-promo__badge {
	flex: none;
	align-self: flex-start;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--tv-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 850;
}

.tshp-car-promo__body {
	flex: 1 1 300px;
	min-width: 0;
}

.tshp-car-promo__body h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 850;
	line-height: 1.3;
}

.tshp-car-promo__body p {
	margin: 6px 0 0;
	color: var(--tv-muted);
	font-size: 13px;
	line-height: 1.6;
}

.tshp-car-promo__quota {
	font-weight: 800;
	color: var(--tv-blue-2);
}

.tshp-car-promo__quota.is-out {
	color: #b45309;
}

/* Photo uploader */
.tshp-car-upload {
	display: grid;
	gap: 12px;
}

.tshp-car-upload__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 10px;
}

.tshp-car-upload__grid:empty {
	display: none;
}

.tshp-car-upload__thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--tv-line);
	border-radius: 12px;
	overflow: hidden;
	background: #f1f5f9;
}

.tshp-car-upload__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tshp-car-upload__rm {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	line-height: 26px;
	text-align: center;
	border: none;
	border-radius: 999px;
	background: rgba(17, 24, 39, .72);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	padding: 0;
}

.tshp-car-upload__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	border: 1.5px dashed #b6c2d2;
	border-radius: 12px;
	background: #fbfcfe;
	color: var(--tv-blue);
	font-weight: 800;
	cursor: pointer;
	justify-self: start;
}

.tshp-car-upload__add:hover {
	border-color: var(--tv-blue);
}

.tshp-car-upload__hint {
	margin: 0;
	color: var(--tv-muted);
	font-size: 12px;
	min-height: 1em;
}

.tshp-car-upload__hint.is-err {
	color: #b42318;
}

@media (max-width: 980px) {
	.tshp-vehicle-layout {
		grid-template-columns: 1fr;
	}

	.tshp-vehicle-preview {
		position: static;
	}

	.tshp-vehicle-certgrid,
	.tshp-vehicle-uploadgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.tshp-vehicle-draft {
		padding: 18px 14px 54px;
	}

	.tshp-vehicle-hero {
		flex-direction: column;
		padding: 20px;
	}

	.tshp-vehicle-hero h1,
	.tshp-vehicle-empty h1 {
		font-size: 25px;
	}

	.tshp-vehicle-hero__actions {
		width: 100%;
		flex-direction: column;
	}

	.tshp-vehicle-certgrid,
	.tshp-vehicle-seed,
	.tshp-vehicle-formgrid,
	.tshp-vehicle-uploadgrid {
		grid-template-columns: 1fr;
	}

	.tshp-vehicle-card {
		padding: 18px;
	}
}

/* hidden 屬性優先(formgrid 的 label{display:grid} 會蓋掉 UA 的 [hidden]{display:none},
   導致「自訂車色/包膜」在未選時仍冒出來;分頁 panel 也靠這個切換)。 */
.tshp-car-form [hidden] { display: none !important; }

/* 分頁(基本資料 / 車身狀況 / 聯絡方式)— RWD 友善,一次填一區 */
.tshp-form-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
	padding: 5px;
	background: #eef3f8;
	border-radius: 14px;
}
.tshp-form-tab {
	flex: 1 1 0;
	min-width: 0;
	min-height: 46px;
	border: 0;
	background: transparent;
	border-radius: 10px;
	font-family: var(--tshp-font-sans, inherit);
	font-size: 15px;
	font-weight: 800;
	color: #5b6674;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.tshp-form-tab__n {
	width: 22px; height: 22px; flex: 0 0 auto;
	border-radius: 50%;
	background: #d7e3f2;
	color: #0f4c81;
	font-size: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	line-height: 1;
}
.tshp-form-tab.is-active {
	background: #fff;
	color: var(--tshp-primary, #0f4c81);
	box-shadow: 0 2px 8px rgb(16 31 52 / 0.10);
}
.tshp-form-tab.is-active .tshp-form-tab__n { background: var(--tshp-primary, #0f4c81); color: #fff; }
.tshp-tab-panel { display: grid; gap: 14px; }

@media (max-width: 600px) {
	.tshp-form-tab { font-size: 14px; padding: 0 4px; gap: 5px; }
	.tshp-form-tab__n { width: 20px; height: 20px; }
}

/* 台灣車型快速選擇 picker */
.tshp-car-picker { border-left: 3px solid var(--tshp-primary, #0f4c81); }

/* 選車型:車系 / 年份 / 車型 一行三欄 */
.tshp-tw-pickrow {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
.tshp-tw-pickrow label { display: grid; gap: 7px; min-width: 0; }
.tshp-tw-pickrow label span { color: #344054; font-size: 13px; font-weight: 800; }
.tshp-tw-pickrow select {
	width: 100%; min-height: 44px; padding: 0 13px;
	border: 1px solid #d0d5dd; border-radius: 11px; background: #fff;
	color: var(--tv-ink); font-size: 15px;
}
.tshp-car-picker__note {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: rgba(15, 76, 129, 0.06);
	color: var(--tshp-primary, #0f4c81);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

/* 自動帶入的原廠規格卡(唯讀) */
.tshp-tw-spec {
	margin-top: 14px;
	padding: 14px 16px 6px;
	border: 1px solid #dbe4ee;
	border-radius: 12px;
	background: linear-gradient(180deg, #f6f9fc 0%, #fff 100%);
}
.tshp-tw-spec__title {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--tshp-primary, #0f4c81);
	margin-bottom: 8px;
}
.tshp-tw-spec__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px 14px;
}
.tshp-tw-spec__grid li {
	display: grid;
	gap: 2px;
	padding-bottom: 8px;
	min-width: 0;
}
.tshp-tw-spec__grid span {
	font-size: 12px;
	color: #667085;
	font-weight: 700;
}
.tshp-tw-spec__grid strong {
	font-size: 15px;
	color: var(--tv-ink, #101828);
	font-weight: 800;
}

/* 出廠年月:年 + 月 併排 */
.tshp-ym { display: flex; gap: 8px; }
.tshp-ym select { flex: 1 1 0; min-width: 0; }

/* 欄位小提示 */
.tshp-field-hint {
	font-size: 12px;
	color: #667085;
	font-weight: 500;
	line-height: 1.4;
}

/* 自訂車色 / 包膜 */
.tshp-paint-other input { width: 100%; }

/* 電池健康 / 剩餘保固 即時提示 */
.tshp-warranty-hint {
	background: rgba(16, 128, 76, 0.07);
	color: #0b6b45;
}
.tshp-warranty-hint span { display: inline-block; }

/* Tesla 認證(站方測試中)小標 */
.tshp-cert-dev {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eef2f6;
	color: #667085;
	font-size: 11px;
	font-weight: 800;
	vertical-align: middle;
}

@media (max-width: 600px) {
	.tshp-tw-spec__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
