/* ==========================================================================
   知产云 · 在线申请（资料提交）页样式
   依赖 style.css 的设计令牌，仅本页加载
   ========================================================================== */

.apply-main {
  background: var(--bg-gray);
  padding: 30px 0 64px;
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 24px;
  align-items: start;
}

/* ---------------- 步骤条 ---------------- */

.stepper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.step::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 12px;
}

.step:last-child::after {
  display: none;
}

.step .dot {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e2e8f4;
  background: #f2f5fb;
  color: #9aa7bd;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.step .dot .ico {
  width: 15px;
  height: 15px;
  display: none;
}

.step .txt {
  margin-left: 9px;
  font-size: 13.5px;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.step.active .dot {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(60, 126, 229, 0.32);
}

.step.active .txt {
  color: #1b2b47;
  font-weight: 600;
}

.step.done .dot {
  background: var(--blue-soft);
  border-color: #cfe0fb;
  color: var(--blue);
}

.step.done .dot b {
  display: none;
}

.step.done .dot .ico {
  display: block;
}

.step.done .txt {
  color: var(--text-2);
}

/* ---------------- 表单卡片 ---------------- */

.apply-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px 32px;
}

.card-lead {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.8;
  margin: -10px 0 26px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line-light);
}

.demo-fill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border: 1px dashed #c8d4ea;
  border-radius: var(--radius-sm);
  background: #fafbfe;
  color: var(--blue);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-fill:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

.field {
  margin-bottom: 20px;
}

.field > label,
.field > .label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.field > label .req {
  color: var(--red);
  margin-left: 2px;
}

.field .hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  line-height: 1.6;
}

.err {
  display: none;
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  line-height: 1.6;
}

.req {
  color: var(--red);
  font-weight: 400;
  margin-left: 2px;
}

.field.invalid .err,
.err.show {
  display: block;
}

.field.invalid .control {
  border-color: var(--red);
  background: #fffafa;
}

.field.invalid .control:focus {
  box-shadow: 0 0 0 3px rgba(248, 82, 82, 0.12);
}

.control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
}

.control::placeholder {
  color: #b3bccd;
}

.control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(60, 126, 229, 0.12);
}

.control:disabled {
  background: #f7f9fc;
  color: var(--text-3);
  cursor: not-allowed;
}

textarea.control {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.75;
  resize: vertical;
}

.select-wrap {
  position: relative;
}

.select-wrap select.control {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.field-3 {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0 18px;
}

/* 单选卡片 */
.opt-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.opt-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px 15px 42px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.opt-card:hover {
  border-color: #b9cff5;
}

.opt-card input {
  position: absolute;
  left: 15px;
  top: 18px;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

.opt-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.opt-card span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.5;
}

.opt-card.on {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: inset 0 0 0 1px var(--blue);
}

/* 验证码 */
.code-row {
  display: flex;
  gap: 10px;
}

.code-row .control {
  flex: 1;
  min-width: 0;
}

.btn-code {
  flex: none;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-code:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-light);
}

.btn-code:disabled {
  color: var(--text-3);
  cursor: not-allowed;
  background: #f7f9fc;
}

/* 类别多选 */
.chip-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-pick label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.chip-pick label:hover {
  border-color: #b9cff5;
  color: var(--blue);
}

.chip-pick label.on {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 500;
}

.chip-pick input {
  display: none;
}

.chip-pick label b {
  font-weight: 600;
  font-size: 11.5px;
  opacity: 0.7;
}

.chip-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--blue);
  background: none;
  border: 0;
  padding: 7px 4px;
  cursor: pointer;
}

/* ---------------- 上传 ---------------- */

.upload-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.upload-row {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-light);
}

.upload-row:last-child {
  border-bottom: 0;
}

.upload-row:nth-child(odd) {
  background: #fcfdff;
}

.ur-label strong {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.ur-label strong .req {
  display: inline;
  font-size: 13.5px;
  margin-left: 2px;
}

.ur-label > span {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.6;
}

.ur-label a {
  color: var(--blue);
  border-bottom: 1px dashed rgba(60, 126, 229, 0.45);
}

.uploader {
  position: relative;
  border: 1px dashed #c8d4ea;
  border-radius: var(--radius-sm);
  background: #fafbfe;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uploader:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.uploader.dragover {
  border-color: var(--blue);
  border-style: solid;
  background: var(--blue-soft);
}

.uploader input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.up-empty {
  display: flex;
  align-items: center;
  gap: 12px;
}

.up-empty .ico {
  width: 22px;
  height: 22px;
  flex: none;
  color: #a9b7d0;
}

.up-empty .u-t {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.up-empty .u-t b {
  color: var(--blue);
  font-weight: 500;
}

.up-empty .u-d {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.file-row {
  display: none;
  align-items: center;
  gap: 12px;
}

.uploader.has-file {
  border-style: solid;
  border-color: #cfe0fb;
  background: var(--blue-light);
  cursor: default;
}

.uploader.has-file input[type="file"] {
  display: none;
}

.uploader.has-file .up-empty {
  display: none;
}

.uploader.has-file .file-row {
  display: flex;
}

.file-thumb {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-thumb .ico {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

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

.file-meta {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.file-size i {
  font-style: normal;
  color: #12a977;
  margin-left: 6px;
}

.file-del {
  flex: none;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s ease;
}

.file-del:hover {
  color: var(--red);
}

.file-del.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------- 费用 / 汇总 ---------------- */

.total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--blue-light);
  border: 1px solid #d8e5fc;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  margin: 4px 0 22px;
}

.total-bar .t1 {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}

.total-bar .t1 b {
  color: var(--text);
  font-weight: 600;
}

.total-bar .money {
  font-size: 26px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.total-bar .money small {
  font-size: 13px;
  font-weight: 400;
  margin-left: 2px;
}

.sum-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

.sum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-gray);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #1b2b47;
}

.sum-edit {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 2px 0;
}

.sum-body {
  padding: 2px 18px;
}

.sum-line {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-light);
  font-size: 13.5px;
  line-height: 1.7;
}

.sum-line:last-child {
  border-bottom: 0;
}

.sum-line .k {
  flex: none;
  width: 96px;
  color: var(--text-3);
}

.sum-line .v {
  flex: 1;
  min-width: 0;
  color: var(--text);
  word-break: break-all;
}

.sum-line .v em {
  font-style: normal;
  color: var(--red);
  font-weight: 600;
}

.sum-line .v .ok {
  color: #12a977;
  font-size: 12.5px;
}

.sum-line .v .miss {
  color: var(--orange);
  font-size: 12.5px;
}

/* 同意条款 */
.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 6px;
}

.agree input {
  margin-top: 4px;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  flex: none;
  cursor: pointer;
}

.agree a {
  color: var(--blue);
}

.agree.invalid {
  color: var(--red);
}

.agree.invalid input {
  outline: 2px solid rgba(248, 82, 82, 0.35);
  outline-offset: 1px;
  border-radius: 2px;
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-light);
}

.step-actions .right {
  display: flex;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.step-actions .btn {
  min-width: 116px;
}

/* 提交进度/失败原因：占满一行，跟在按钮下方，不挤按钮的文字 */
.submit-status {
  display: none;
  flex-basis: 100%;
  text-align: right;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-3);
}

.save-tip {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.save-tip .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12a977;
  box-shadow: 0 0 0 3px rgba(18, 169, 119, 0.14);
}

/* ---------------- 侧栏 ---------------- */

.apply-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}

.side-card h4 {
  font-size: 15px;
  color: #1b2b47;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-card h4 .ico {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.side-list li {
  display: flex;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.75;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-light);
}

.side-list li:last-child {
  border-bottom: 0;
}

.side-list li .n {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.side-price {
  border-top: 1px dashed var(--line-light);
  margin-top: 4px;
  padding-top: 14px;
}

.side-price .row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 5px 0;
}

.side-price .row b {
  color: var(--text);
  font-weight: 600;
}

.side-price .row.total {
  border-top: 1px dashed var(--line-light);
  margin-top: 6px;
  padding-top: 10px;
  align-items: baseline;
}

.side-price .row.total b {
  color: var(--red);
  font-size: 20px;
}

.side-help {
  background: linear-gradient(160deg, #2a66c9, #4c8bf0);
  border: 0;
  color: #fff;
}

.side-help h4 {
  color: #fff;
}

.side-help h4 .ico {
  color: #fff;
}

.side-help p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.side-help .tel {
  display: block;
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.side-help .tip {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.side-help .btn {
  margin-top: 16px;
}

/* ---------------- 提交成功 ---------------- */

.success-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 46px 40px 40px;
  text-align: center;
}

.ok-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #4c8bf0, #2a66c9);
  box-shadow: 0 12px 30px rgba(60, 126, 229, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ok-mark .ico {
  width: 34px;
  height: 34px;
  stroke: #fff;
  stroke-width: 2.6;
}

.success-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1b2b47;
  letter-spacing: 0.5px;
}

.success-card .sub {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.8;
}

.order-no {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
  background: var(--bg-gray);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 13px;
  color: var(--text-2);
}

.order-no b {
  color: var(--blue);
  font-size: 15px;
  letter-spacing: 1px;
}

.recv-box {
  text-align: left;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.recv-head {
  background: var(--bg-gray);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #1b2b47;
}

.recv-list {
  padding: 6px 18px;
}

.recv-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: var(--text-2);
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-light);
}

.recv-list li:last-child {
  border-bottom: 0;
}

.recv-list li .st {
  font-size: 12px;
  color: #12a977;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.recv-list li .st .ico {
  width: 13px;
  height: 13px;
}

.flow-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin: 34px 0 8px;
  text-align: left;
}

.flow-line .fs {
  position: relative;
  padding: 20px 10px 0 0;
}

.flow-line .fs::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 100%;
  height: 3px;
  background: #e8eef9;
}

.flow-line .fs.on::before {
  background: linear-gradient(90deg, var(--blue), #7babff);
}

.flow-line .fs b {
  display: block;
  font-size: 12.5px;
  color: #1b2b47;
  font-weight: 600;
  line-height: 1.5;
}

.flow-line .fs span {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.demo-note {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.8;
  text-align: left;
  background: #fbfcfe;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* ---------------- toast ---------------- */

#toast {
  position: fixed;
  left: 50%;
  top: 92px;
  z-index: 999;
  transform: translate(-50%, -14px);
  background: rgba(27, 43, 71, 0.94);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(15, 30, 60, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  max-width: 80vw;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .apply-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .upload-row {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .apply-layout {
    grid-template-columns: 1fr;
  }

  .apply-side {
    position: static;
  }

  .step .txt {
    display: none;
  }

  .stepper {
    padding: 14px 16px;
  }

  .step::after {
    margin: 0 8px;
  }
}

@media (max-width: 720px) {
  .apply-main {
    padding: 22px 0 46px;
  }

  .apply-card {
    padding: 24px 18px 26px;
  }

  .field-2,
  .field-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .opt-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upload-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 14px 16px;
  }

  .step-actions {
    flex-wrap: wrap;
  }

  .step-actions .save-tip {
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .step-actions .right {
    width: 100%;
  }

  .step-actions .right .btn {
    flex: 1;
    min-width: 0;
  }

  .success-card {
    padding: 34px 20px 30px;
  }

  .success-card h2 {
    font-size: 20px;
  }

  .flow-line {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 0;
  }

  .flow-line .fs:nth-child(3)::before,
  .flow-line .fs:nth-child(6)::before {
    background: #e8eef9;
  }

  .sum-line .k {
    width: 76px;
  }
}
