.fx-drop-sign-page {
  min-height: 100vh;
  background: #f5f7fb;
  padding: 24px;
  font-family: Arial, sans-serif;
  color: #111827;
}

.fx-drop-sign-card {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
}

.fx-branch-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.fx-branch-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
}

.fx-branch-details {
  justify-self: start;
}

.fx-branch-details strong {
  font-size: 15px;
}

.fx-branch-logo {
  justify-self: end;
}

.fx-branch-logo img {
  max-width: 150px;
  max-height: 70px;
  object-fit: contain;
}

.fx-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
}

.fx-muted {
  color: #6b7280;
  font-size: 14px;
}

.fx-small {
  font-size: 12px;
}

.fx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.fx-grid label,
.fx-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 5px;
}

.fx-readonly-field {
  min-width: 0;
}

.fx-readonly-field div {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  min-height: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-signature-wrap {
  width: 100%;
  margin: 18px 0 0;
}

.fx-signature-box {
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.fx-signature-box canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.fx-message {
  margin-top: 10px;
  font-size: 13px;
}

.fx-message.fx-error {
  color: #dc3545;
}

.fx-message.fx-success {
  color: #198754;
}

.fx-complete-message {
  padding: 28px 0 8px;
  text-align: center;
}

.fx-complete-message h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.fx-complete-message p {
  margin: 0;
  color: #198754;
  font-size: 14px;
}

.fx-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.fx-actions button {
  border: 1px solid #0d6efd;
  border-radius: 6px;
  padding: 9px 13px;
  background: #fff;
  color: #0d6efd;
  cursor: pointer;
}

.fx-actions #fx-drop-save-signature {
  background: #0d6efd;
  color: #fff;
}

@media (max-width: 760px) {
  .fx-drop-sign-page {
    padding: 12px;
  }

  .fx-grid {
    grid-template-columns: 1fr;
  }

  .fx-readonly-field div {
    white-space: normal;
  }

  .fx-branch-header {
    grid-template-columns: 1fr;
  }

  .fx-branch-header h1 {
    text-align: left;
    font-size: 20px;
  }

  .fx-branch-logo {
    justify-self: start;
  }
}
