/* 填表页：深色，对齐介绍站 */

:root {
	--bg: #12151a;
	--panel: rgba(27, 31, 34, 0.92);
	--text: #ffffff;
	--muted: rgba(255, 255, 255, 0.72);
	--line: rgba(255, 255, 255, 0.2);
	--accent: #2b4a8c;
	--danger: #ff8f8f;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	min-height: 100%;
	background: var(--bg);
	color: var(--text);
	font-family: "Source Sans Pro", "PingFang SC", "Microsoft YaHei", Helvetica, sans-serif;
	line-height: 1.65;
	letter-spacing: 0.04rem;
}

a { color: #fff; }

.form-top {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.95rem 1.25rem;
	border-bottom: 1px solid var(--line);
	background: rgba(0, 0, 0, 0.35);
	position: sticky;
	top: 0;
	z-index: 10;
}

.form-top a {
	text-decoration: none;
	font-size: 0.9rem;
	letter-spacing: 0.08rem;
}

.form-shell {
	max-width: 46rem;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 6rem;
}

.form-shell h1 {
	margin: 0 0 0.4rem;
	font-size: clamp(1.55rem, 3.5vw, 2rem);
	letter-spacing: 0.12rem;
	line-height: 1.3;
}

.form-lead {
	margin: 0 0 1.35rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.panel {
	margin: 0 0 1.1rem;
	padding: 1.1rem 1.05rem 1.05rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 4px;
}

.panel h2 {
	margin: 0 0 0.85rem;
	font-size: 1.02rem;
	letter-spacing: 0.1rem;
}

.hint {
	margin: 0 0 0.85rem;
	font-size: 0.86rem;
	color: var(--muted);
}

.hint em {
	font-style: normal;
	color: #fff;
	font-weight: 600;
}

.field {
	margin: 0 0 0.95rem;
}

.field:last-child { margin-bottom: 0; }

.label-row {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.4rem;
	font-size: 0.92rem;
}

.req {
	color: #ffb4b4;
	font-size: 0.85rem;
}

.opt {
	display: inline-block;
	padding: 0.1rem 0.4rem;
	border: 1px solid var(--line);
	font-size: 0.72rem;
	color: var(--muted);
	letter-spacing: 0.06rem;
}

input[type="text"],
input[type="number"],
textarea {
	width: 100%;
	padding: 0.7rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	font: inherit;
	outline: none;
}

textarea {
	min-height: 6.5rem;
	resize: vertical;
}

input:focus, textarea:focus {
	border-color: rgba(255, 255, 255, 0.65);
}

.counter {
	margin-top: 0.3rem;
	font-size: 0.75rem;
	color: var(--muted);
	text-align: right;
}

.dim-row {
	display: grid;
	grid-template-columns: 6.5rem 1fr 3rem;
	gap: 0.5rem;
	align-items: center;
	margin: 0 0 0.55rem;
}

.dim-row .unit {
	font-size: 0.82rem;
	color: var(--muted);
}

.seg {
	display: flex;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
}

.seg button,
.chip,
.priority {
	appearance: none;
	cursor: pointer;
	border: 1px solid var(--line);
	background: transparent;
	color: #fff;
	font: inherit;
	letter-spacing: 0.06rem;
}

.seg button {
	flex: 1;
	padding: 0.65rem 0.5rem;
	border-radius: 2px;
}

.seg button.active,
.chip.active,
.priority.active {
	background: rgba(43, 74, 140, 0.75);
	border-color: rgba(255, 255, 255, 0.7);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
}

.chip {
	padding: 0.55rem 0.75rem;
	border-radius: 2px;
	font-size: 0.86rem;
}

.priority-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
}

.priority {
	text-align: left;
	padding: 0.85rem 0.9rem;
	border-radius: 2px;
}

.priority strong {
	display: block;
	margin: 0 0 0.25rem;
}

.priority span {
	display: block;
	font-size: 0.8rem;
	color: var(--muted);
}

.upload-box {
	margin: 0 0 0.95rem;
	padding: 1rem 1rem 1.05rem;
	border: 1px dashed var(--line);
	border-radius: 2px;
}

.upload-box.required-box {
	border-style: solid;
}

.upload-head {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	align-items: baseline;
	margin: 0 0 0.35rem;
}

.upload-title { font-weight: 600; }
.upload-desc { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.75rem; }

.file-input-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.upload-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 4.5rem;
	padding: 1rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font: inherit;
	letter-spacing: 0.1rem;
	cursor: pointer;
}

.upload-trigger:hover {
	background: rgba(255, 255, 255, 0.12);
}

.upload-status {
	margin: 0.55rem 0 0;
	font-size: 0.82rem;
	color: var(--muted);
}

.upload-status.is-ready {
	color: rgba(255, 255, 255, 0.9);
}

.thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 0.75rem;
}

.thumb {
	position: relative;
	width: 6.5rem;
	height: 6.5rem;
	border: 1px solid var(--line);
	overflow: hidden;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.25);
}

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

.thumb button {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	width: 1.6rem;
	height: 1.6rem;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	font-size: 1rem;
}

.file-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.75rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.04);
}

.file-row-main {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
}

.file-mark {
	flex: 0 0 auto;
	width: 1.8rem;
	height: 1.8rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	font-size: 0.75rem;
}

.file-name {
	font-size: 0.88rem;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-delete {
	flex: 0 0 auto;
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.45);
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.82rem;
	letter-spacing: 0.06rem;
	padding: 0.4rem 0.7rem;
	cursor: pointer;
	border-radius: 2px;
}

.file-delete:hover {
	background: rgba(255, 255, 255, 0.08);
}

.check-row {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	font-size: 0.9rem;
}

.check-row input {
	margin-top: 0.25rem;
}

.field-error, .form-error {
	margin-top: 0.35rem;
	color: var(--danger);
	font-size: 0.84rem;
}

.field.has-error input,
.field.has-error textarea,
.upload-box.has-error {
	border-color: #ff8f8f;
}

.bottom-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom));
	background: rgba(10, 12, 16, 0.94);
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: center;
	z-index: 20;
}

.bottom-bar .inner {
	width: min(46rem, 100%);
	display: flex;
	gap: 0.65rem;
}

.bottom-bar button {
	flex: 1;
	appearance: none;
	border: 1px solid #fff;
	background: #fff;
	color: #111;
	font: inherit;
	letter-spacing: 0.1rem;
	padding: 0.85rem 1rem;
	cursor: pointer;
	border-radius: 2px;
}

.bottom-bar button.ghost {
	background: transparent;
	color: #fff;
}

.bottom-bar button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.toast {
	display: none;
	position: fixed;
	left: 50%;
	bottom: 5.5rem;
	transform: translateX(-50%);
	max-width: min(90vw, 24rem);
	padding: 0.75rem 1rem;
	background: rgba(20, 24, 30, 0.96);
	border: 1px solid var(--line);
	border-radius: 4px;
	font-size: 0.88rem;
	z-index: 30;
}

.toast.show { display: block; }

.hidden { display: none !important; }

@media (max-width: 700px) {
	.priority-grid { grid-template-columns: 1fr; }
	.dim-row { grid-template-columns: 1fr; }
	.dim-row .unit { display: none; }
}
