/* 接单签署车辆经营性租赁协议 + 横屏手写签名 */

.accept-sheet {
  max-height: 96%;
}

.accept-subtitle {
  margin: 3px 0 0;
  color: #9aaba5;
  font-size: 7px;
  line-height: 1.45;
}

.accept-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.accept-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 15px 15px;
}

.accept-order-summary {
  padding: 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0d2834, #113b44);
  color: #e5f8f4;
}

.accept-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6f9990;
  font-family: var(--mono);
  font-size: 7px;
}

.accept-order-top b {
  color: #ffd28d;
  font-size: 13px;
  font-weight: 600;
}

.accept-order-route {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.accept-order-route > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.accept-order-route > div:last-child {
  text-align: right;
}

.accept-order-route b {
  color: #f0faf7;
  font-size: 15px;
  font-weight: 600;
}

.accept-order-route span:not(.icon) {
  color: #789b93;
  font-size: 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.accept-order-route .icon {
  width: 13px;
  height: 13px;
  color: #54d6b6;
}

.accept-order-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(158, 214, 203, 0.1);
  color: #7e9f98;
  font-size: 7px;
}

.accept-order-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.accept-order-meta .icon {
  width: 10px;
  height: 10px;
}

.accept-order-meta span:nth-child(2) {
  font-family: var(--mono);
}

.accept-order-meta span:last-child {
  margin-left: auto;
}

.accept-company {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid #f1e4e1;
  border-radius: 9px;
  background: #fffaf9;
}

.accept-company img {
  width: 35px;
  height: 28px;
  object-fit: contain;
  flex: none;
}

.accept-company > div {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.accept-company b {
  color: #7b504d;
  font-size: 7.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.accept-company span {
  color: #b3938d;
  font-size: 6.5px;
}

.accept-company em {
  color: #c14b44;
  font-style: normal;
  font-size: 6.5px;
  white-space: nowrap;
  padding: 3px 5px;
  border-radius: 4px;
  background: #fbeceb;
}

.accept-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.accept-fields label {
  display: grid;
  gap: 5px;
}

.accept-fields label > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  color: #6a847d;
  font-size: 7.5px;
}

.accept-fields label > span em {
  color: #a9b7b2;
  font-style: normal;
  font-size: 6.5px;
}

.accept-fields input {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #fff;
  color: #25433e;
  font-size: 10px;
  outline: none;
}

.accept-fields input:focus {
  border-color: #86cdb9;
  box-shadow: 0 0 0 3px rgba(14, 159, 127, 0.08);
}

.accept-fields input::placeholder {
  color: #c1cdc9;
}

.accept-field-full {
  grid-column: 1 / -1;
}

.signature-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 78px;
  padding: 9px;
  border: 1px dashed #cfe1db;
  border-radius: 10px;
  background: #f8fcfa;
}

.signature-trigger.signed {
  border-style: solid;
  border-color: #cde8dd;
  background: #fff;
}

.signature-trigger-empty {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #71938a;
}

.signature-trigger-empty .icon {
  width: 21px;
  height: 21px;
  color: #0e9f7f;
  margin-bottom: 2px;
}

.signature-trigger-empty b {
  font-size: 8.5px;
  font-weight: 600;
}

.signature-trigger-empty em {
  color: #a0b0aa;
  font-style: normal;
  font-size: 6.5px;
}

.signature-trigger-preview {
  display: none;
  width: 100%;
  height: 66px;
  justify-content: center;
  align-items: center;
}

.signature-trigger.signed .signature-trigger-empty {
  display: none;
}

.signature-trigger.signed .signature-trigger-preview {
  display: flex;
}

.signature-trigger-preview img {
  max-width: 85%;
  max-height: 62px;
  object-fit: contain;
}

.accept-date-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f6faf8;
  color: #8da39c;
  font-size: 7px;
}

.accept-date-row .icon {
  width: 11px;
  height: 11px;
  color: #0e9f7f;
}

.accept-date-row b {
  color: #46635b;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
}

.accept-date-row em {
  margin-left: auto;
  color: #a2b1ac;
  font-style: normal;
  font-size: 6.5px;
}

.accept-success {
  align-items: center;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
}

.accept-contract-no {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 13px;
  padding: 9px 11px;
  border: 1px solid #e7efec;
  border-radius: 9px;
  background: #fbfcfb;
}

.accept-contract-no span {
  color: #97a7a2;
  font-size: 7px;
}

.accept-contract-no b {
  color: #45645b;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.accept-success-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  width: 100%;
  margin-top: 9px;
}

.accept-success-sign > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e7efec;
  border-radius: 9px;
  background: #fff;
}

.accept-success-sign span {
  color: #9daca7;
  font-size: 6.5px;
}

.accept-success-sign img {
  width: 100%;
  height: 49px;
  object-fit: contain;
}

.accept-success-sign .seal img {
  height: 62px;
  mix-blend-mode: multiply;
}

.accept-success-note {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f5faf8;
  color: #78968d;
  font-size: 6.8px;
  line-height: 1.5;
  text-align: left;
}

.accept-success-note .icon {
  width: 10px;
  height: 10px;
  flex: none;
  color: #0e9f7f;
  margin-top: 1px;
}

.accept-success-actions {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-top: 11px;
}

/* 横屏手写签名 */

html.signature-mode,
html.signature-mode body {
  overflow: hidden;
  background: #071923;
}

html.signature-mode .driver-stage {
  display: block;
  padding: 0;
  min-height: 100dvh;
}

html.signature-mode .driver-story,
html.signature-mode .phone-statusbar,
html.signature-mode .phone-island,
html.signature-mode .driver-tabbar {
  display: none !important;
}

html.signature-mode .phone-frame {
  width: 100vw;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: #071923;
}

html.signature-mode .phone-screen {
  border-radius: 0;
  background: #071923;
}

html.signature-mode .driver-app-shell {
  display: none;
}

html.signature-mode .phone-layer {
  z-index: 500;
}

.signature-overlay {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 75% 20%, rgba(37, 190, 157, 0.13), transparent 38%),
    #071923;
  color: #e8f8f4;
  pointer-events: auto;
}

.signature-overlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 11px;
  flex: none;
}

.signature-overlay-head span {
  color: #51cdb5;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 1.8px;
}

.signature-overlay-head h2 {
  margin: 4px 0 2px;
  color: #f1fbf8;
  font-size: 19px;
  font-weight: 600;
}

.signature-overlay-head p {
  margin: 0;
  color: #71978f;
  font-size: 7px;
}

.signature-overlay-head button {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid rgba(147, 210, 199, 0.15);
  border-radius: 9px;
  color: #9ec3bb;
}

.signature-overlay-head button .icon {
  width: 15px;
  height: 15px;
}

.signature-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 13px;
  flex: 1;
  min-height: 0;
  padding: 0 20px 18px;
}

.signature-paper {
  position: relative;
  min-height: 0;
  border-radius: 12px;
  background: #fffdfa;
  box-shadow: 0 20px 50px rgba(0, 8, 12, 0.3);
  overflow: hidden;
}

.signature-paper::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed #d9e4df;
  border-radius: 7px;
  pointer-events: none;
}

#signature-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.signature-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #c0cec9;
  font-size: 13px;
  letter-spacing: 4px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.signature-placeholder.hide {
  opacity: 0;
}

.signature-paper-foot {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 15px;
  display: flex;
  justify-content: space-between;
  color: #9fb0aa;
  font-size: 7.5px;
  font-family: var(--mono);
  pointer-events: none;
}

.signature-side {
  display: flex;
  flex-direction: column;
  padding: 3px 0;
}

.signature-side > b {
  color: #b9d8d1;
  font-size: 9px;
  font-weight: 600;
}

.signature-side > p {
  margin: 6px 0 0;
  color: #6c9087;
  font-size: 7.5px;
  line-height: 1.65;
}

.signature-rotate-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 7px 8px;
  border: 1px solid rgba(80, 205, 178, 0.15);
  border-radius: 7px;
  background: rgba(43, 211, 174, 0.07);
  color: #68d9c0;
  font-size: 6.8px;
  line-height: 1.45;
}

.signature-rotate-hint.portrait {
  border-color: rgba(229, 166, 70, 0.18);
  background: rgba(229, 166, 70, 0.08);
  color: #e0b36d;
}

.signature-rotate-hint .icon {
  width: 11px;
  height: 11px;
  flex: none;
}

.signature-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.signature-actions .driver-btn {
  width: 100%;
  height: 38px;
}

.signature-actions .driver-btn--ghost {
  border-color: rgba(157, 214, 203, 0.16);
  color: #9bc2ba;
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 700px) {
  .accept-sheet {
    max-height: 94%;
  }

  .accept-fields {
    grid-template-columns: 1fr;
  }

  .accept-field-full {
    grid-column: auto;
  }

  .signature-overlay-head {
    padding: 10px 13px 7px;
  }

  .signature-overlay-head h2 {
    font-size: 16px;
  }

  .signature-work {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 0 13px 12px;
  }

  .signature-side {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
    align-items: end;
  }

  .signature-side > b,
  .signature-side > p {
    grid-column: 1 / -1;
  }

  .signature-rotate-hint {
    margin-top: 0;
  }

  .signature-actions {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
  }
}
