/* ============================================================
   发布需求页样式
   ============================================================ */

.pd-title-inner {
  padding: 18px 0 14px;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.pd-crumbs {
  font-size: 13px;
  color: var(--ink-3);
}
.pd-crumbs a {
  color: var(--ink-3);
  transition: color .2s;
}
.pd-crumbs a:hover { color: var(--primary); }
.pd-sep { margin: 0 8px; color: #C8D1DE; }
.pd-cur { color: var(--primary); }

.pd-main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin: 8px 0 0;
  letter-spacing: 1px;
}
.pd-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 4px 0 0;
}

/* ---------- 主体 ---------- */
.pd-main {
  padding: 28px 0 70px;
  background: var(--bg-soft);
  min-height: calc(100vh - 280px);
}
.pd-main-inner {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 40px 32px;
  box-shadow: var(--shadow-sm);
}

/* ---------- 表单行 ---------- */
.pd-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pd-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.pd-label i {
  color: #E5484D;
  font-style: normal;
  margin-right: 2px;
}

.pd-input,
.pd-select,
.pd-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.pd-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
.pd-input::placeholder,
.pd-textarea::placeholder { color: #A8B2C1; }
.pd-input:focus,
.pd-select:focus,
.pd-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(41,112,192,.1);
}

.pd-field.has-error .pd-input,
.pd-field.has-error .pd-select,
.pd-field.has-error .pd-textarea {
  border-color: #E5484D;
  background: #FFF7F7;
}

.pd-error {
  font-size: 12.5px;
  color: #E5484D;
  min-height: 16px;
  line-height: 16px;
  opacity: 0;
  transition: opacity .2s;
}
.pd-field.has-error .pd-error { opacity: 1; }

.pd-field-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pd-field-foot .pd-error { min-height: 0; }
.pd-counter {
  font-size: 12.5px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.pd-counter.over { color: #E5484D; }

/* ---------- 附件上传 ---------- */
.pd-uploader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  width: fit-content;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  transition: background .2s, transform .2s;
  cursor: pointer;
}
.pd-upload-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.pd-upload-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.pd-upload-tip {
  font-size: 12.5px;
  color: var(--ink-3);
}
.pd-upload-tip b { color: #E5484D; font-weight: 600; }

.pd-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F7FAFE;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  transition: border-color .2s;
}
.pd-file-item.is-uploading { border-color: var(--accent-deep); }
.pd-file-item.is-error { border-color: #FFA7A7; background: #FFF7F7; }
.pd-file-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.pd-file-info { flex: 1; min-width: 0; }
.pd-file-name {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-file-status {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.pd-file-item.is-error .pd-file-status { color: #E5484D; }
.pd-file-remove {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: background .2s, color .2s;
}
.pd-file-remove:hover { background: rgba(229,72,77,.1); color: #E5484D; }

/* ---------- 按钮 ---------- */
.pd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.pd-btn {
  position: relative;
  padding: 11px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
}
.pd-btn-cancel {
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
}
.pd-btn-cancel:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pd-btn-submit {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 4px 14px rgba(41,112,192,.3);
}
.pd-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(41,112,192,.4);
}
.pd-btn-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
}
.pd-btn-submit .pd-btn-loading { display: none; align-items: center; gap: 6px; }
.pd-btn-submit.is-loading .pd-btn-text { display: none; }
.pd-btn-submit.is-loading .pd-btn-loading { display: inline-flex; }

/* ---------- 成功弹窗 ---------- */
.pd-modal {
  position: fixed; inset: 0; z-index: 11000;
  display: flex; align-items: center; justify-content: center;
}
.pd-modal-mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.pd-modal-body {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  text-align: center;
  max-width: 420px; width: 90%;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  animation: pdModalIn .3s ease;
}
@keyframes pdModalIn {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.pd-modal-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #52C41A 0%, #389E0D 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(82,196,26,.35);
}
.pd-modal-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.pd-modal-sub {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 24px;
}
.pd-modal-sub b { color: var(--primary); font-weight: 600; }
.pd-modal-actions {
  display: flex;
  justify-content: center;
}
.pd-modal-btn {
  padding: 10px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.pd-modal-btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(41,112,192,.3);
}
.pd-modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(41,112,192,.4);
}

/* ---------- 轻提示 Toast（局部版，避免依赖 project-detail.css） ---------- */
.pd-toast {
  position: fixed;
  top: 88px;
  left: 50%;
  z-index: 12000;
  max-width: 80vw;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  background: rgba(22,35,58,.9);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
  transition: opacity .3s, transform .3s;
}
.pd-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pd-toast.success { background: rgba(82,196,26,.94); }
.pd-toast.error { background: rgba(229,77,66,.94); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .pd-main-title { font-size: 22px; }
  .pd-sub { font-size: 13px; }
  .pd-main-inner { padding: 24px 18px; }
  .pd-actions { flex-direction: column-reverse; }
  .pd-btn { width: 100%; }
}