/* ==========================================================================
   需求大厅 / 接单广场 —— 深色主题，与全站 ai-home / work 同源
   ========================================================================== */

.dm {
	--dm-line: rgba(140, 130, 255, 0.16);
	--dm-cyan: #22d3ee;
	--dm-primary: #6d5cff;
	--dm-txt: #ecebff;
	--dm-dim: #9b97c0;
	--dm-dim2: #6d6a92;
	--dm-card: rgba(255, 255, 255, 0.035);

	color: var(--dm-txt);
	position: relative;
	border-radius: 16px;
	padding: 26px 28px 40px;
	box-sizing: border-box;
	background:
		radial-gradient(1000px 420px at 90% -50px, rgba(109, 92, 255, 0.16), transparent 60%),
		radial-gradient(800px 400px at -5% 30%, rgba(34, 211, 238, 0.08), transparent 55%),
		#0d0c20;
}

/* ---------- 顶栏 ---------- */
.dm-head { display: flex; align-items: flex-start; gap: 18px; }
.dm-head h1 { margin: 0; font-size: 26px; letter-spacing: 2px; }
.dm-head h1 em {
	font-style: normal;
	background: linear-gradient(90deg, var(--dm-cyan), var(--dm-primary));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.dm-sub { margin: 8px 0 0; font-size: 13px; color: var(--dm-dim); }
.dm-sub-hot { color: #ffd166; }
.dm-sub-hot b { color: #ff9f43; }
.dm-head .dm-publish { margin-left: auto; flex-shrink: 0; }

/* ---------- 按钮 ---------- */
.dm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
	font-size: 14px; cursor: pointer; text-decoration: none; color: var(--dm-txt);
	transition: all 0.2s ease; line-height: 1.2;
}
.dm-btn.sm { padding: 7px 14px; font-size: 13px; }
.dm-btn-primary {
	background: linear-gradient(90deg, var(--dm-primary), #8b5cf6);
	color: #fff; box-shadow: 0 4px 16px rgba(109, 92, 255, 0.4);
}
.dm-btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.dm-btn-ghost { background: transparent; border-color: var(--dm-line); color: var(--dm-dim); }
.dm-btn-ghost:hover { color: var(--dm-txt); border-color: rgba(140, 130, 255, 0.45); }
.dm-btn-apply {
	background: linear-gradient(90deg, #ff4d6d, #ff6b6b);
	color: #fff; box-shadow: 0 3px 12px rgba(255, 77, 109, 0.35);
}
.dm-btn-apply:hover { filter: brightness(1.12); }

/* ---------- 筛选 ---------- */
.dm-filter { margin-top: 22px; }
.dm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-chip {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 7px 16px; border-radius: 999px;
	font-size: 13px; color: var(--dm-dim); cursor: pointer;
	border: 1px solid var(--dm-line); background: transparent;
	text-decoration: none; transition: all 0.2s ease; line-height: 1.4;
}
.dm-chip.sm { padding: 5px 12px; font-size: 12.5px; }
.dm-chip:hover { color: var(--dm-txt); border-color: rgba(140, 130, 255, 0.4); }
.dm-chip.on {
	color: #fff; border-color: transparent;
	background: linear-gradient(90deg, var(--dm-primary), #8b5cf6);
	box-shadow: 0 4px 14px rgba(109, 92, 255, 0.35);
}
.dm-chip.urgent.on { background: linear-gradient(90deg, #ff4d6d, #ff6b6b); box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35); }
.dm-chip .dot, .dm-meta .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.open { background: #2dd4a7; box-shadow: 0 0 6px rgba(45, 212, 167, 0.9); }
.dot.closed { background: #6d6a92; }

.dm-rows {
	margin-top: 14px; padding: 12px 16px;
	border: 1px solid var(--dm-line); border-radius: 12px;
	background: var(--dm-card);
	display: flex; flex-direction: column; gap: 8px;
}
.dm-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dm-filter-label { flex-shrink: 0; width: 62px; font-size: 12.5px; color: var(--dm-dim2); }

.dm-searchbar {
	margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dm-searchbar svg { width: 16px; height: 16px; color: var(--dm-dim2); flex-shrink: 0; }
.dm-searchbar input[type="text"] {
	flex: 1; min-width: 220px; height: 36px; padding: 0 16px;
	border: 1px solid var(--dm-line); border-radius: 999px; outline: none;
	background: var(--dm-card); color: var(--dm-txt); font-size: 13px; box-sizing: border-box;
}
.dm-searchbar input[type="text"]::placeholder { color: var(--dm-dim2); }
.dm-searchbar input[type="text"]:focus { border-color: rgba(140, 130, 255, 0.5); }

/* ---------- 状态 / 排序行 ---------- */
.dm-meta {
	margin-top: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding-bottom: 14px; border-bottom: 1px solid var(--dm-line);
}
.dm-meta-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dm-meta-label { font-size: 12.5px; color: var(--dm-dim2); }
.dm-total { margin-left: auto; font-size: 12.5px; color: var(--dm-dim2); }

/* ---------- 需求列表 ---------- */
.dm-list { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.dm-item {
	border: 1px solid var(--dm-line); border-radius: 14px;
	background: var(--dm-card); padding: 18px 22px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dm-item:hover {
	border-color: rgba(140, 130, 255, 0.45);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(140, 130, 255, 0.2);
}
.dm-item.closed { opacity: 0.62; }

.dm-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dm-avatar {
	width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
	border: 1px solid rgba(140, 130, 255, 0.35);
}
.dm-avatar.sm { width: 32px; height: 32px; }
.dm-avatar-txt {
	display: inline-flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--dm-primary), #22d3ee);
	color: #fff; font-size: 17px; font-weight: 600;
}
.dm-avatar.sm.dm-avatar-txt { font-size: 13px; }
.dm-user-info { display: flex; flex-direction: column; line-height: 1.35; }
.dm-user-name { font-size: 14px; font-weight: 600; }
.dm-user-time { font-size: 12px; color: var(--dm-dim2); }
.dm-item-ops { margin-left: auto; display: flex; gap: 8px; }

.dm-item-title {
	display: block; margin-top: 12px; font-size: 16.5px; font-weight: 600;
	color: var(--dm-txt); text-decoration: none; letter-spacing: 0.3px;
}
.dm-item-title:hover { color: #b3aaff; }
.dm-title { margin: 12px 0 0; font-size: 21px; letter-spacing: 0.5px; }
.dm-item-desc {
	margin: 8px 0 0; font-size: 13px; color: var(--dm-dim); line-height: 1.75;
}
.dm-desc {
	margin-top: 14px; font-size: 14px; color: #c9c6e8; line-height: 1.9;
	white-space: pre-wrap; word-break: break-word;
}

/* ---------- 标签 ---------- */
.dm-item-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dm-tag {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 11px; border-radius: 999px;
	font-size: 12px; color: var(--dm-dim);
	border: 1px solid var(--dm-line); background: rgba(255, 255, 255, 0.03);
	line-height: 1.5;
}
.dm-tag b { color: var(--dm-txt); }
.dm-tag.hot { color: #ff8f9f; border-color: rgba(255, 77, 109, 0.45); background: rgba(255, 77, 109, 0.1); }
.dm-tag.budget { color: #ffd166; border-color: rgba(255, 209, 102, 0.4); background: rgba(255, 209, 102, 0.08); font-weight: 600; }
.dm-tag.off { color: #8a87a8; border-color: rgba(140, 130, 255, 0.12); }
.dm-tag.open { color: #2dd4a7; border-color: rgba(45, 212, 167, 0.4); background: rgba(45, 212, 167, 0.08); }
.dm-tag.coop1 { color: #8fb3ff; border-color: rgba(143, 179, 255, 0.4); background: rgba(143, 179, 255, 0.08); }
.dm-tag.coop2 { color: #7ee2c2; border-color: rgba(126, 226, 194, 0.4); background: rgba(126, 226, 194, 0.08); }
.dm-tag.coop3 { color: #d9a9ff; border-color: rgba(217, 169, 255, 0.4); background: rgba(217, 169, 255, 0.08); }
.dm-tag.coop4 { color: #ffc98f; border-color: rgba(255, 201, 143, 0.4); background: rgba(255, 201, 143, 0.08); }
.dm-apply-stat { margin-top: 14px; font-size: 12.5px; color: var(--dm-dim2); }
.dm-apply-stat b { color: #ff8f9f; }

/* 重置筛选 chip */
.dm-reset { color: #ff8f9f; border-color: rgba(255, 77, 109, 0.4); }
.dm-reset:hover { color: #fff; border-color: rgba(255, 77, 109, 0.75); background: rgba(255, 77, 109, 0.12); }

/* 报名状态标记按钮 */
.dm-apply-ops { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dm-apply-ops button {
	padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 12px;
	border: 1px solid var(--dm-line); background: transparent; color: var(--dm-dim);
	transition: all 0.2s ease; line-height: 1.6;
}
.dm-apply-ops button:hover { color: var(--dm-txt); border-color: rgba(140, 130, 255, 0.5); }
.dm-apply-ops button.done { color: #7ee2c2; border-color: rgba(45, 212, 167, 0.45); background: rgba(45, 212, 167, 0.08); }
.dm-apply-ops button.reject { color: #ff8f9f; border-color: rgba(255, 77, 109, 0.45); background: rgba(255, 77, 109, 0.08); }

/* ---------- 面板（详情 / 表单 / 侧栏） ---------- */
.dm-crumb { margin-bottom: 16px; }
.dm-crumb a { color: var(--dm-dim); font-size: 13px; text-decoration: none; }
.dm-crumb a:hover { color: var(--dm-txt); }
.dm-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.dm-detail-side { display: flex; flex-direction: column; gap: 20px; }
.dm-panel {
	border: 1px solid var(--dm-line); border-radius: 14px;
	background: var(--dm-card); padding: 20px 22px;
}
.dm-panel h3 { margin: 0 0 14px; font-size: 15.5px; letter-spacing: 1px; }
.dm-apply-empty { margin: 0; font-size: 13px; color: var(--dm-dim2); }
.dm-apply-empty a { color: #8fb3ff; text-decoration: none; }

/* 报名列表 */
.dm-apply-list { display: flex; flex-direction: column; gap: 14px; }
.dm-apply-item { display: flex; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--dm-line); }
.dm-apply-item:last-child { border-bottom: none; padding-bottom: 0; }
.dm-apply-body { min-width: 0; flex: 1; }
.dm-apply-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.dm-apply-contact { margin-top: 6px; font-size: 13px; color: #ffd166; }
.dm-apply-msg { margin-top: 6px; font-size: 13px; color: var(--dm-dim); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* 报名表单 */
.dm-apply-form { display: flex; flex-direction: column; gap: 14px; }
.dm-applied-ok {
	padding: 14px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.8;
	color: #7ee2c2; border: 1px solid rgba(45, 212, 167, 0.35); background: rgba(45, 212, 167, 0.08);
}

/* 侧栏相似需求 */
.dm-side-list { display: flex; flex-direction: column; gap: 10px; }
.dm-side-item {
	display: flex; flex-direction: column; gap: 4px; text-decoration: none;
	padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
	transition: all 0.2s ease;
}
.dm-side-item:hover { border-color: var(--dm-line); background: rgba(255, 255, 255, 0.03); }
.dm-side-title { font-size: 13px; color: var(--dm-txt); }
.dm-side-meta { font-size: 12px; color: var(--dm-dim2); }
.dm-side-tip p { margin: 0 0 8px; font-size: 12.5px; color: var(--dm-dim2); line-height: 1.7; }

/* ---------- 发布表单 ---------- */
.dm-publish-form { margin-top: 2px; }
.dm-pub-title { margin: 0; font-size: 22px; letter-spacing: 1px; }
.dm-pub-sub { margin: 8px 0 20px; font-size: 13px; color: var(--dm-dim2); }
.dm-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.dm-field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dm-field-grid .dm-field { margin-bottom: 18px; }
.dm-field label { font-size: 13px; color: var(--dm-dim); }
.dm-field label i { color: #ff6b6b; font-style: normal; margin-right: 2px; }
.dm-input, .dm-select, .dm-textarea {
	width: 100%; box-sizing: border-box; padding: 10px 14px;
	border: 1px solid var(--dm-line); border-radius: 10px; outline: none;
	background: rgba(0, 0, 0, 0.25); color: var(--dm-txt); font-size: 13.5px;
	line-height: 1.6; font-family: inherit;
}
.dm-select option { background: #1a1836; color: var(--dm-txt); }
.dm-input:focus, .dm-select:focus, .dm-textarea:focus { border-color: rgba(140, 130, 255, 0.55); }
.dm-textarea { resize: vertical; }
.dm-budget { display: flex; gap: 8px; }
.dm-budget .dm-input { flex: 1; }
.dm-budget .dm-select { width: 110px; flex-shrink: 0; }
.dm-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--dm-dim); }
.dm-check input { accent-color: var(--dm-primary); width: 15px; height: 15px; }
.dm-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-seg button {
	padding: 8px 18px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--dm-line); background: transparent;
	color: var(--dm-dim); font-size: 13px; transition: all 0.2s ease;
}
.dm-seg button.on {
	color: #fff; border-color: transparent;
	background: linear-gradient(90deg, var(--dm-primary), #8b5cf6);
	box-shadow: 0 4px 14px rgba(109, 92, 255, 0.35);
}
.dm-pub-foot { display: flex; gap: 12px; margin-top: 6px; }

/* ---------- 空状态 ---------- */
.wk-empty {
	margin-top: 30px; padding: 60px 20px; text-align: center;
	border: 1px dashed var(--dm-line); border-radius: 14px;
	color: var(--dm-dim2); font-size: 14px; line-height: 2;
}
.wk-empty svg { width: 46px; height: 46px; stroke: var(--dm-dim2); margin-bottom: 8px; }
.wk-empty .dm-btn { margin-top: 14px; }

/* ---------- 分页（沿用 wk-page 基础上补充深色） ---------- */
.wk-page { margin-top: 24px; text-align: center; }
.wk-page a, .wk-page span { margin: 0 3px; }
.wk-page a { color: var(--dm-dim); text-decoration: none; padding: 6px 12px; border: 1px solid var(--dm-line); border-radius: 8px; font-size: 13px; }
.wk-page a:hover { color: var(--dm-txt); border-color: rgba(140, 130, 255, 0.45); }
.wk-page .active span { color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 13px; background: linear-gradient(90deg, var(--dm-primary), #8b5cf6); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	.dm-detail-grid { grid-template-columns: 1fr; }
	.dm-field-grid { grid-template-columns: 1fr; }
	.dm-head { flex-direction: column; }
	.dm-head .dm-publish { margin-left: 0; }
}
